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

g:netrw_altfile = 1 doesn't work as expected for files in subdirectories #137

Open
smlx opened this issue May 29, 2024 · 0 comments
Open

Comments

@smlx
Copy link

smlx commented May 29, 2024

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

  1. nvim subdir/file1 to open file1.
  2. :Explore to open netrw.
  3. Select file2 and hit enter to open it.
  4. Ctrl-6 takes me back to file1.

Scenario 2 (vim-vinegar doesn't work as expected):

  1. nvim subdir/file1 to open file1.
  2. - in normal mode to open netrw via vim-vinegar.
  3. Select file2 and hit enter to open it.
  4. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant