Skip to content

Use Vifm as a side bar? #81

Open
Open

Description

@GNOMES

I currently use Netrw in Neovim, and Vifm outside of Neovim, and realized it's funny to learn two different file browsers in/out of Neovim.

I ran across this request to use Vifm as a vertical split like Nerd-tree:

#19

I might be misunderstanding the additions this request implemented.

The current implementation after playing with it seems that Vifm in vim/nvim opens up in a split (SplitVifm/VsplitVifm) or full screen (Vifm), and will either open a file in the current window or a split. This closes Vifm, thus hiding the file tree.

My desired implementation would be to have Vifm persist on a vertical split, opening files in the current files window (vifm | file), or create a split to the side of current file (vifm | file 1 | file 2, or vifm | file 1/file2). This would be similar to netrw_preview = 1.

Is this possible?

Activity

  1. xaizek commented on Aug 27, 2022

    @xaizek
    Member

    That issue was basically about location on the screen rather than about persistence.

    Opening a file and not closing would need a communication channel between Vifm and host (right now Vifm just writes a file and Vifm.vim reads it after Vifm exits). Does Neovim have a feature analogous to Vim's terminal API as mentioned here? It would probably be the best way of implementing it, but it's not all that's needed.

  2. qadzek commented on Oct 20, 2023

    @qadzek
    Contributor

    I agree this would be an interesting feature.

    Opening a file and not closing

    If this part is hard to implement, I wonder if there is a way to
    immediately relaunch Vifm in a split, after picking a file.

    It's already possible to do this manually, but it's quite cumbersome:

    1. :vert Vifm
    2. Pick a file
    3. :vert Vifm again
    4. <C-w>w, to switch focus to the file
  3. xaizek commented on Oct 20, 2023

    @xaizek
    Member

    immediately relaunch Vifm in a split, after picking a file.

    That's a huge crutch that will be noticeable. reveal.nvim does communication with a pipe using workarounds, so it can be done especially with the help of better Lua API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions