Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Vifm as a side bar? #81

Open
GNOMES opened this issue Aug 26, 2022 · 3 comments
Open

Use Vifm as a side bar? #81

GNOMES opened this issue Aug 26, 2022 · 3 comments

Comments

@GNOMES
Copy link

GNOMES commented Aug 26, 2022

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?

@xaizek
Copy link
Member

xaizek commented Aug 27, 2022

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.

@qadzek
Copy link
Contributor

qadzek commented Oct 20, 2023

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

@xaizek
Copy link
Member

xaizek commented Oct 20, 2023

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
Labels
None yet
Development

No branches or pull requests

3 participants