tpope / vim-vinegar

vinegar.vim: Combine with netrw to create a delicious salad dressing
https://www.vim.org/scripts/script.php?script_id=5671
2.22k stars 87 forks source link

Add an instruction how to close vinegar without selecting any file #109

Closed privorotskii closed 5 years ago

privorotskii commented 5 years ago

Switching back from vinegar to the opened file

I am new into vim and I have spent some time to find out, how to close vinegar buffer without selecting any file and just go back to file I edited. Now I know, that opened vinegar is just a buffer and it is easy to go to the previous buffer just pressing Ctrl + 6. But it would be useful for other newbies to see this info in Readme.markdown. May I create a PR with it?

fprawits commented 5 years ago

Interesting, I was completely unaware of <C-6> working in this case.

I think you might be confusing something here, there is no "vinegar buffer", what you probably mean is netrw, the built-in file explorer of vim. The "usual" way (at least that is the way I've been using it) of switching between your file explorer and the buffer you have been working on in case you haven't opened netrw in a split window to begin with, is to use :Rex. Typing :Rex again will get you back exactly where you left netrw, so this command lets you jump back and forth.

tpope commented 5 years ago

I've clarified netrw/vinegar thing by building on top of #110. I didn't know about :Rexplore, that's a good tip too.