Git Product home page Git Product logo

Comments (12)

dinhhuy258 avatar dinhhuy258 commented on May 27, 2024 2

Hi @omaru-ok

  1. You are right. The behavior of change_root_to_parent was not convenient, so I have created a PR to update it.
    #11
  2. 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

  1. I will prepare a pr to support trash deletion this weekend.
  2. I will have a look into the SPACE issue this weekend as well.
  3. Regarding the naming of the action copy_selections, I understand that it should be paste, 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.

dinhhuy258 avatar dinhhuy258 commented on May 27, 2024 1

Hi @omaru-ok

  1. 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)
  2. 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.

dinhhuy258 avatar dinhhuy258 commented on May 27, 2024 1

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.

NormTurtle avatar NormTurtle commented on May 27, 2024

sorry for bad english

from sfm.nvim.

dinhhuy258 avatar dinhhuy258 commented on May 27, 2024

Hi @omaru-ok, thank you very much for opening the issue.

  1. 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

image

  1. 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.

NormTurtle avatar NormTurtle commented on May 27, 2024

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 ||

  1. 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
},
  1. send me the video with the bug

the Video
https://user-images.githubusercontent.com/108952834/235369417-f5428bdc-d261-4b18-8f16-504e8044ce44.mp4

  1. i want to embrace simple way , but most of readme's makes me confuse
    i tried installting Extension but it din't worked

image
is there anything wrong? i don't understand the code really provided here please make it simple

  1. if i use Default / Split , it just shows a very long Width no _matter _ what setting i change
    image

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.

dinhhuy258 avatar dinhhuy258 commented on May 27, 2024

Sorry for my late response... Hmm, thank you for your information.

  1. 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...
  1. 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)

  2. 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.

NormTurtle avatar NormTurtle commented on May 27, 2024
  1. you din't answer my all previous questions :(
  2. regarding the video , im trying to replicate Change Dir up basically UP feature of nvim-tree using keybind h
  3. What is your current cursor?

i dont see this as a question? or i dont understand what it mean !?

  1. 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

  1. What is the current behavior...

there is no other way provided in Readme for changing Directory's
so i guess 'parent_entry' should work :(

  1. 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.

dinhhuy258 avatar dinhhuy258 commented on May 27, 2024

If you still have any question, feel free let me know...

from sfm.nvim.

NormTurtle avatar NormTurtle commented on May 27, 2024

i just really dig into sfm-fs.nvim
some issue i found

  1. at mapping i think copy_selections should be renamed to "Paste"
    and
  2. delete should give me enough power to safe me 😿 i mean ,
    it should let me set custom folder as TRASH, in window there is no trash-cli , but i delete's files accidentally , just for recovering them can i set delete_folder="~\.cache\.trash" PLEASE if u just did that , my life will be changed and i will be fearless ,
  3. 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.

NormTurtle avatar NormTurtle commented on May 27, 2024

:) 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.

NormTurtle avatar NormTurtle commented on May 27, 2024

GREAT

from sfm.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.