

GitHub - tpope/vim-vinegar: vinegar.vim: combine with netrw to create a deliciou...
source link: https://github.com/tpope/vim-vinegar
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

vinegar.vim
Split windows and the project drawer go together like oil and vinegar. I don't mean to say that you can combine them to create a delicious salad dressing. I mean that they don't mix well!
- Drew Neil
You know what netrw is, right? The built in directory browser? Well, vinegar.vim enhances netrw, partially in an attempt to mitigate the need for more disruptive "project drawer" style plugins.
Some of the behaviors added by vinegar.vim would make excellent upstream additions. Many, the author would probably reject. Others are a bit too wild to even consider.
- Press
-
in any buffer to hop up to the directory listing and seek to the file you just came from. Keep bouncing to go up, up, up. Having rapid directory access available changes everything. - All that annoying crap at the top is turned off, leaving you with nothing
but a list of files. This is surprisingly disorienting, but ultimately
very liberating. Press
I
to toggle until you adapt. - The oddly C-biased default sort order is replaced with a sensible application
of
'suffixes'
. - File hiding: files are not listed that match with one of the patterns in
'wildignore'
.
If you putlet g:netrw_list_hide = '\(^\|\s\s\)\zs\.\S\+'
in your vimrc, vinegar will initialize with dot files hidden. Pressgh
to toggle dot file hiding. - Press
.
on a file to pre-populate it at the end of a:
command line. This is great, for example, to quickly initiate a:grep
of the file or directory under the cursor. Type.!chmod +x
and get:!chmod +x path/to/file
. - Press
y.
to yank an absolute path for the file under the cursor. - Press
~
to go home. - Use Vim's built-in
CTRL-^
(CTRL-6
) for switching back to the previous buffer from the netrw buffer.
Installation
Install using your favourite package manager, or use Vim's built-in package support:
mkdir -p ~/.vim/pack/tpope/start
cd ~/.vim/pack/tpope/start
git clone https://github.com/tpope/vim-vinegar.git
Promotion
Like vinegar.vim? Star the repository on GitHub and vote for it on vim.org.
Love vinegar.vim? Follow tpope on GitHub and Twitter.
License
Copyright © Tim Pope. Distributed under the same terms as Vim itself.
See :help license
.
Recommend
-
131
commentary.vim Comment stuff out. Use gcc to comment out a line (takes a count), gc to comment out the target of a motion (for example, gcap to comment out a paragraph), gc in visual mo...
-
207
Vim Markdown runtime files This is the development version of Vim's included syntax highlighting and filetype plugins for Markdown. Generally you don't need to install these if you are running a recent version of Vim. If you want...
-
91
vim-cucumber - Vim Cucumber runtime files
-
76
README.markdown speeddating.vim Take the following date: 1999-12-31 Because Vim treats the hyphen as a negative sign, pressing <C-A> on the 31...
-
111
README.markdown eunuch.vim Vim sugar for the UNIX shell commands that need it the most. Features include: :Delete: Delete a buffer and the file on disk simultaneously....
-
69
README.markdown rsi.vim You know Readline key bindings? Of course you do, they're in your shell, your REPL, and perhaps even the GUI for your OS. They're similar to Emacs key bindings (C-a fo...
-
63
README.markdown vim-haml This project contains the runtime files for Haml, Sass, and SCSS that ship with Vim. You only need it if you want the very la...
-
70
README.markdown classpath.vim This plugin sets the 'path' for JVM languages to match the class path of your current Java project. This le...
-
24
Vim: you don't need NERDtree or (maybe) netrwLast updated Saturday, Nov 16, 2019Vim: you don't need NERDtree or (maybe) netrwVim's netrw file browser is good enough. With a few tweaks there is no need f...
-
10
#VimManaging Local and Remote Filesystems with Vim and netrw
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK