Comments (12)
Hi @omaru-ok
- You are right. The behavior of change_root_to_parent was not convenient, so I have created a PR to update it.
#11 - parent_entry is used to move the cursor to the parent directory of the current entry. I believe it same as this feature in nvim-tree https://github.com/nvim-tree/nvim-tree.lua/blob/master/doc/nvim-tree-lua.txt#L150
sfm-fs issues
- I will prepare a pr to support trash deletion this weekend.
- I will have a look into the
SPACE
issue this weekend as well. - Regarding the naming of the action
copy_selections
, I understand that it should bepaste
, but I also have a move_selections action and I don't know which name is suitable for it either, so I decided to use copy_selections and move_selections so that both names are consistent.
from sfm.nvim.
Hi @omaru-ok
- I see, you want to change the dir up, currently, I haven't supported that feature (i rarely use it then I have not implemented it) . I will prepare a pull request to support that feature soon
change_root_to_parent
(within 1-2 days) - Regarding installing extension for
sfm
you can follow my setting here: https://github.com/dinhhuy258/dotfiles/blob/master/nvim/lua/plugins/sfm.lua
From your file, you need only to change like this
local sfm_explorer = require("sfm").setup({
view = {
side = "right", -- side of the tree, can be `left`, `right`. this setting will be ignored if view.float.enable is set to true,
width = 2, -- this setting will be ignored if view.float.enable is set to true,
float = {
enable = true,
config = {
relative = "editor",
border = "rounded", -- ┌────────────────┐
width = 40, -- int or function -- │ │
height = 10, -- int or function -- │ dinhhuy258 ├────────► PLEASE ADD more info to comments ╔════════╗
row = 1, -- int or function -- │ │ what does "int or function" mean!? AGAIN ║ PLEASE ║
col = 1 -- int or function -- └────────────────┘ ╚════════╝
} } },
mappings = {
custom_only = true,
list = {
{ key = "u", action = "parent_entry",}, -- Move cursor to the parent directory
{ key = "h", action = "parent_entry",}, -- Move cursor to the parent directory
{ key = "p", action = "parent_entry",}, -- Move cursor to the parent directory
-- Edit
{ key = "l", action = "edit", },
{ key = "<cr>", action = "edit", },
-- { key ="<s-tab>", action = "close_entry", },
{ key = "c>", action = "close_entry", }, -- Close current opened directory or parent
-- Quit
{ key = "x", action = "close", },
{ key = "q", action = "close", },
{ key = "<esc>", action = "close", },
{ key = "<C-r>", action = "reload", }, -- Reload the explorer
-- Splits
{ key = "<C-h>", action = "vsplit" },
{ key = "<C-v>", action = "split" },
{ key = "<C-t>", action = "tabnew" },
-- Movement
{ key = "J", action = "first_sibling" }, -- Navigate to the first sibling of current file or directory
{ key = "K", action = "last_sibling" }, -- Navigate to the last sibling of current file or directory
} },
})
sfm_explorer:load_extension("sfm-fs")
-- or
-- sfm_explorer:load_extension("sfm-fs", {
-- your sfm-fs setting
-- })
from sfm.nvim.
Hi @omaru-ok . I just added a feature to support changing root to parent and changing root to the current entry. For more information please refer this pr: #10
For the issue in sfm-fs
. I will work on it tomorrow.
Thank you...
from sfm.nvim.
sorry for bad english
from sfm.nvim.
Hi @omaru-ok, thank you very much for opening the issue.
- For the issue with
parent_entry
could you please send me the video with the bug, I could not reproduce the issue on my local machine. This is my config
- I checked, and the implementation was not correct. It still uses
view.width
even though the float is enabled. I just made a fix and hopefully, it's clear to you now.
thank you
from sfm.nvim.
i dont know much of lua , so i don't use complex tables
, and variable, coz they will make things hard to me in the end,
i use the simple way || it may change im i become programmer and learned the real programming some day ||
- Lazy install Lazy-loading Tips would be appreciated , yes i want to lazyload SFm since i use Oil too
{ -- Simple file manager
'dinhhuy258/sfm.nvim',
dependencies = { "dinhhuy258/sfm-fs.nvim" },
config = function()
require("File_manager")
end
},
- send me the video with the bug
- i want to embrace simple way , but most of readme's makes me confuse
i tried installting Extension but it din't worked
is there anything wrong? i don't understand the code really provided here please make it simple
final thought, i think SFM is in early stage , there is so many new things to add
SFm has to be the simple yet-powerfull tree !, i realy din't liked nerdtree,
from sfm.nvim.
Sorry for my late response... Hmm, thank you for your information.
- https://user-images.githubusercontent.com/108952834/235369417-f5428bdc-d261-4b18-8f16-504e8044ce44.mp4
Regarding your video, I still do not understand what is the issue here. Could you please tell me a little bit about the context? Such as:
- What is your current cursor?
- Which entry should the cursor move to when pressing action (parent_entry)?
- What is the current behavior...
-
if i use Default / Split , it just shows a very long Width no _matter _ what setting i change
Can I have your setting please (your dotfiles) -
final thought, i think SFM is in early stage , there is so many new things to add
I understand that and the reason I created this plugin was just for fun :P ... I am very surprised and happy that you created an issue there.
from sfm.nvim.
- you din't answer my all previous questions :(
- regarding the video , im trying to replicate
Change Dir up
basically UP feature of nvim-tree using keybindh
-
What is your current cursor?
i dont see this as a question? or i dont understand what it mean !?
-
Which entry should the cursor move to when pressing action (parent_entry)?
as the name parent_entry
says it should do UP, a parents Directory , as cd ..
CLI
-
What is the current behavior...
there is no other way provided in Readme for changing Directory's
so i guess 'parent_entry' should work :(
-
Can I have your setting please (your dotfiles)
i do not indent to publish nvim-dots , but here it is
and here is SFM.Dots
Please check previously asked questoin ur missing the Extension part!
from sfm.nvim.
If you still have any question, feel free let me know...
from sfm.nvim.
i just really dig into sfm-fs.nvim
some issue i found
- at mapping i think
copy_selections
should be renamed to "Paste"
and delete
should give me enough power to safe me 😿 i mean ,
it should let me setcustom folder
as TRASH, in window there is no trash-cli , but i delete's files accidentally , just for recovering them can i setdelete_folder="~\.cache\.trash"
PLEASE if u just did that , my life will be changed and i will be fearless ,- Serious issue Can't use key the Default behavior of sfm-fs ,
AS select a file on SPACE ,
but i use space= key , so sfm dont register space as slection ,
workaround !
! 🔴{ key = "space", action = "toggle_selection", },
-- THIS DO NOT WORK
! 🟢{ key = "<leader>", action = "toggle_selection", },
-- THIS WORK WELL ⭐
^ just for who use as SPACE
video demonstration Of ** SPACE
vs <leader>
**
2023-05-04_01-46-23.mp4
from sfm.nvim.
:) this commit was soo good, however, there is some litlte thing that is buggin me still
this is what config i end up with.
{ key = "h", action = "change_root_to_parent",},--Change root dir, parent dir of the current entry
{ key = "o", action = "change_root_to_entry",}, --Change root dir, current folder entry or to the parent dir of current file entry
{ key = "<tab>", action = "change_root_to_entry",}, --Change root dir, current folder entry or to the parent dir of current file entry
{ key = "u", action = "parent_entry",}, -- Move cursor to the parent directory
{ key = "l", action = "edit", },
{ key = "<cr>", action = "edit", },
{ key ="<s-tab>", action = "close_entry", }, -- Close current opened directory or parent
THE ISSUE
if u want to change_root_to_parent
u have do the parent_entry
first , that is really annoying.
PLEASE
modify it so no matter on what file my cursor is on it should do change_root_to_parent
without having to do parent_entry
,
i hope u got it what i mean ?! and if u dont , please tell me i can video demonstration
btw what is actual usecase of parent_entry
🤔 anyway?, i just found it useless
from sfm.nvim.
GREAT
from sfm.nvim.
Related Issues (20)
- `Width View` conflict with window.nvim HOT 8
- `<leader>` KEY CLASH HOT 8
- Considering integrate sfm-fs to sfm plugin
- Ui like `mini.files` HOT 2
- trash feature HOT 5
- Re-enable opening a file within a split HOT 1
- Can't open a file with a `#` in its name HOT 2
- Pick window when open file
- Allow user to customize to use their ui component such as nui.nvim HOT 5
- how to use `load_extension` in `opts = `? HOT 5
- Add file nesting HOT 5
- Remove unused actions
- Implement missing actions: open_entry, open_all_entries, close_all_entries. HOT 5
- Unable to disable "space" key binding. HOT 3
- Curated list for third-party extensions? HOT 1
- File-preview
- File actions HOT 2
- Support file operations event (such as file renamed, file deleted...) HOT 1
- Support float window
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sfm.nvim.