You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first thanks for the great plugin. It's a real game changer for my workflows and has worked well for years.
I've recently found that let g:netrw_altfile = 1 doesn't work as expected with vim-vinegar. However it does work for :Explore! Let me give some scenarios to explain.
Assume I am in a directory with a subdirectory subdir containing file1, and file2. let g:netrw_altfile = 1 is set.
Scenario 1 (:Explore works as expected):
nvim subdir/file1 to open file1.
:Explore to open netrw.
Select file2 and hit enter to open it.
Ctrl-6 takes me back to file1.
Scenario 2 (vim-vinegar doesn't work as expected):
nvim subdir/file1 to open file1.
- in normal mode to open netrw via vim-vinegar.
Select file2 and hit enter to open it.
Ctrl-6 takes me back to netrw.
I would expect that with g:netrw_altfile = 1 set, step 4 in Scenario 2 should take me back to file1.
Interestingly, if I am running nvim from the subdirectory containing the files then vim-vinegar works the same way as :Explore (i.e. as I would expect).
I'm using Neovim v0.10.0, and vim-vinegar bb1bcdd.
The text was updated successfully, but these errors were encountered:
I've run into the same issue, but this seems to be a bug in Vim...
Vinegar executes :edit %:h to open Netrw. With Vim 9.0.270 this retains the alt file, e.g. :echo expand('#') after :edit %:h shows in your case file1. With Vim 9.1.600 this changes the alt file to the directory which was opened.
Hi, first thanks for the great plugin. It's a real game changer for my workflows and has worked well for years.
I've recently found that
let g:netrw_altfile = 1
doesn't work as expected withvim-vinegar
. However it does work for:Explore
! Let me give some scenarios to explain.Assume I am in a directory with a subdirectory
subdir
containingfile1
, andfile2
.let g:netrw_altfile = 1
is set.Scenario 1 (
:Explore
works as expected):nvim subdir/file1
to openfile1
.:Explore
to opennetrw
.file2
and hit enter to open it.Ctrl-6
takes me back tofile1
.Scenario 2 (
vim-vinegar
doesn't work as expected):nvim subdir/file1
to openfile1
.-
in normal mode to opennetrw
via vim-vinegar.file2
and hit enter to open it.Ctrl-6
takes me back tonetrw
.I would expect that with
g:netrw_altfile = 1
set, step 4 in Scenario 2 should take me back tofile1
.Interestingly, if I am running
nvim
from the subdirectory containing the files thenvim-vinegar
works the same way as:Explore
(i.e. as I would expect).I'm using Neovim v0.10.0, and vim-vinegar bb1bcdd.
The text was updated successfully, but these errors were encountered: