TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What Vim Plugins do you use?

127 pointsby bitboxeralmost 15 years ago
I have switched to vim a little more than a week ago and would love to see what plugins/extensions others are using.<p>What plugins do you use and what is your favorite plugin and why?

33 comments

telemachosalmost 15 years ago
Like a lot of people I have a fair amount of Vim-related stuff on Github. I'll put links at the end:<p>@ pathogen - to manage all the other plugins neatly<p>@ delimitMate - autoclose quotes, (,{,[ - you can define protected regions (e.g., strings) for no autoclose<p>@ vim-endwise - automagically enter an 'end' as needed in Ruby files<p>@ vim-bufexplorer - work better with buffers<p>@ vim-fugitive - lots of Git goodness for Vim<p>@ vim-surround - add, delete and change common pairs easily<p>@ IndexedSearch - show total count number and current hit for searches<p>@ gist - add support for sending buffers to gist or editing gists via Vim<p>@ vim-pastie - adds support for <a href="http://pastie.org/" rel="nofollow">http://pastie.org/</a><p>@ rvm.vim - show current Ruby interpreter in status line<p>@ vim-perlbrew - ditto for current Perl interpreter<p><a href="http://github.com/telemachus/vim-perlbrew" rel="nofollow">http://github.com/telemachus/vim-perlbrew</a><p><a href="http://github.com/telemachus/vim-varia" rel="nofollow">http://github.com/telemachus/vim-varia</a><p><a href="http://github.com/telemachus/dotfiles/tree/master/vim/" rel="nofollow">http://github.com/telemachus/dotfiles/tree/master/vim/</a>
antileetalmost 15 years ago
I have my entire .vim directory on github. You can see my plugins folder here:<p><a href="http://github.com/ninjagod/etc/tree/master/vim/plugin/" rel="nofollow">http://github.com/ninjagod/etc/tree/master/vim/plugin/</a><p>I've been using Vim for three years or so. Apart from the usual bunch of plugins (NERD_tree, snipmate, etc), I have a few scripts I like:<p>Pretty much everything by Tim Pope - surround.vim, matchit.vim, fugitive, etc.<p>Fuzzy finder. I don't know how I survived without this until a few months ago. It allows you to enter a search term, and returns fuzzy matches, and you can jump to any of the matches. Things that Fuzzy finder supports include files, buffers, tags, help, etc.<p>Bufexplorer: One more of my favorites. "\be" brings up a little text file which you can use to manage your buffers. This is similar to Emacs' buffer explorer (C-x C-b). Except since this is also a text buffer, you can use common motions to delete, switch, save buffers, etc. (Another item is minibufexplorer, which shows all the buffers like "tabs". I stopped using this after switching to a more emacs-esque way of keeping buffers open and using only one gvim window").<p>Bufkill.vim: Is a very useful little tool for me. I use splits a lot, and sometimes killing a buffer closes the split. This small tool has been invaluable. :BD closes the buffer, but keeps the splits in place.<p>Eclim: You can use Eclim as a frontend for eclipse. I use some fancy eclipse IDEs sometime like CDT, PyDev, Aptana, etc. But eclipse's editor isn't spectacular. Eclim allows me to use vim as the editor and lets eclipse do the heavy lifting - autocomplete, project management etc.<p>Supertab: Use Tab for all your insert mode completion. Somehow any form of intelligent completion was always very flaky for me with vim. Still, I map this to keyword complete, which is usually pretty helpful.<p>Remotes: This isn't a plugin, but a native feature. You can use Vim remotes to keep one instance of gvim running and use "gvim --remote" instead of "gvim" to open files inside a single instance, rather than open each file inside a terminal, and close it when you're finished. I found this really helps improve productivity.<p>I even aliased "vim" and "vi" to map to the remote editor. You can see my tiny workaround for this: <a href="http://github.com/ninjagod/etc/blob/master/zshrc#L31" rel="nofollow">http://github.com/ninjagod/etc/blob/master/zshrc#L31</a><p>I would recommend you read Peter Krumin's articles on various vim plugins, etc.
评论 #1591029 未加载
评论 #1591200 未加载
steveloshalmost 15 years ago
I use:<p>- pathogen (for keeping bundles nicely separated)<p>- pyflakes-vim (highlighting errors in Python files on the fly)<p>- slime.vim (sending text in the current buffer out to a screen session)<p>- scratch.vim (an easy way to make a scratch buffer, great when used with a REPL in a screen session and slime.vim)<p>- ack.vim (easy way to use Ack instead of grep)<p>- NERD Commenter ("toggle comments" is the only function I use from this, but it works great)<p>- PeepOpen (much prettier than FuzzyFinder TextMate, and actively developed!)<p>- NERD Tree (for when I need to add/move/rename files [I do all my opening with PeepOpen])<p>- rainbow (Highlights pairs of parenthesis/brackets in their own colors. Great for LISP, sometimes useful for other languages as well)<p>- snipmate (TextMate-style snippets. I'm still building up a decent set of snippets I use often.)<p>- sparkup (like Zen Coding, but just seems to work more smoothly with vim)<p>- surround (modify surrounding brackets, tags, parentheses, ets)<p>- repeat (just for repeating surround actions)<p>- yankring (awesome yank/paste manager)<p>My dotfiles (including the vim stuff) are on Bitbucket: <a href="http://bitbucket.org/sjl/dotfiles/" rel="nofollow">http://bitbucket.org/sjl/dotfiles/</a>
评论 #1593062 未加载
kilowattalmost 15 years ago
If you do Python development, definitely check out my pyflakes-vim plugin that highlights errors on the fly: <a href="http://www.vim.org/scripts/script.php?script_id=2441" rel="nofollow">http://www.vim.org/scripts/script.php?script_id=2441</a><p>Another really useful plugin I need to "release" is a "I'm Feeling Lucky" plugin that opens a browser window with the first Google result of the word the cursor is over--this such a useful general-purpose search that I use it all the time.<p>Finally, VCSCommand.vim is pretty great for viewing SVN/Git/etc diffs, making commits, seeing annotated files, etc: <a href="http://www.vim.org/scripts/script.php?script_id=90" rel="nofollow">http://www.vim.org/scripts/script.php?script_id=90</a>
danielhalmost 15 years ago
* NERD_tree : Tree navigation<p>* gnupg : Plugin for transparent editing of gpg encrypted files.<p>Not a plugin, but related: my .vim directory/.vimrc is a symlink to a directory/file in my Dropbox folder, to keep my plugins and settings in sync on multiple PCs.
评论 #1590866 未加载
bitboxeralmost 15 years ago
Btw here is my list:<p>* pathogen : install plugins in seperate directories<p>* NERD_tree : Tree navigation<p>* NERD_commenter: Comment/uncomment lines. File type agnostic<p>* Rename : Rename file in buffer<p>* Ack : Search using ack not grep<p>* Command-T : Fuzzy find files in path * Rails.vim : shortcuts to open models, controllers and other ruby on rails related stuff<p>* snipMate : Textmate like snipplet funktion<p>* surround : Add, change or delete surroundings
评论 #1590793 未加载
mfukaralmost 15 years ago
Very few, really. Here goes:<p>- Taglist : uses exuberant ctags to parse your code and present you with a nice source code browser. It's a lifesaver for large projects.<p>- surround : Add, change or delete surroundings (punctuation, quotes, tags, etc.) in pairs.<p>- lhCpp : a suite of C and C++ plugins<p>- SuperTab : all insert-mode completion done with Tab<p>- minibufexpl : if you're working with buffers a lot, it will make your life easier<p>Those are all, I think. Of course there's heaps of other functionality that I've added in my own .vimrc, does that count? :)
评论 #1591365 未加载
khingebjergalmost 15 years ago
If you watch the PeepCode screencasts "Smash into Vim", <a href="http://peepcode.com/products/smash-into-vim-ii" rel="nofollow">http://peepcode.com/products/smash-into-vim-ii</a>, (I only watched part two) they have a .vim directory that you can use as a starter. Specifically it uses the pathogen plugin to organize the plugins into a bundle directory, which i find much nicer.
prsalmost 15 years ago
If you are developing with RoR, <a href="http://github.com/astrails/dotvim#readme" rel="nofollow">http://github.com/astrails/dotvim#readme</a> is a good resource to start your quest for knowledge.
mgrouchyalmost 15 years ago
I put my .vimrc and .vim directory on github: <a href="http://github.com/mgrouchy/vim" rel="nofollow">http://github.com/mgrouchy/vim</a><p>Its a constantly evolving thing, wherever I find a pain point, or an optimization to be made, it gets changed.<p>The focus is mostly python development on OSX using MacVim, but I have isolated most things that require MacVim/GVim so they don't load in a terminal.<p>It doesn't matter so much because whenever I want to get setup, I just git clone those directories into my home directory but I am seriously looking into Pathogen, which seems like a saner way to handle packages in vim.<p>edit: I just noticed there is a little whitespace bug in my django template handling, so be aware of that until I fix it.<p>edit edit: Fixed!
评论 #1591204 未加载
Aprechealmost 15 years ago
I use almost no configuration changes either. I use a lot of machines, and I can't be bothered to install configs and plugins on every machine I come across. If I become dependent on weird plugins, what do I do on a machine that doesn't have them?<p>Also, I haven't even come close to mastering all of the commands and other things that are already built into vim. If I haven't mastered all of those, why do I need to add more? Instead of changing vim, I should change myself. It's much easier, and it transfers to every machine automatically.
indiaalmost 15 years ago
Other than the usual ones mentioned here, in a rails specific environment, I use rsense[1], acp[2], rails.vim[3]. This works really well for me and I would recommend it to any rails developer.<p>[1] <a href="http://cx4a.org/software/rsense/" rel="nofollow">http://cx4a.org/software/rsense/</a><p>[2] <a href="http://www.vim.org/scripts/script.php?script_id=1879" rel="nofollow">http://www.vim.org/scripts/script.php?script_id=1879</a><p>[3] <a href="http://www.vim.org/scripts/script.php?script_id=1567" rel="nofollow">http://www.vim.org/scripts/script.php?script_id=1567</a>
Buzzzzalmost 15 years ago
Anyone who has a good plugin for html/javascript? Tried a couple but noone seems to support the mix of html and javascript in the same file :(.<p>//Buzzz
qhoxiealmost 15 years ago
To anyone using fuzzy-finder or Jamis' fuzzy-finder-textmate, I highly recommend checking out <i>Command-T</i>. I find it to be much faster and more stable. I was never all that thrilled with fuzzy finder, so this has been a joy to use.<p><a href="http://www.vim.org/scripts/script.php?script_id=3025" rel="nofollow">http://www.vim.org/scripts/script.php?script_id=3025</a>
评论 #1592899 未加载
mhansenalmost 15 years ago
Fugitive has been the most lifechanging one. Takes working with git to the next level:<p><pre><code> - view diffs of the current file with vimdiff - stage from within vim - commit from within vim - blame from within vim - repository-wide grep within vim</code></pre>
mreidalmost 15 years ago
Here's mine: * project - configurable file lists * NERDTree - directory browsing * autocomplpop - autocomplete pop ups * markdown - syntax highlighter * pathogen - sane plugin management * Molokai - nice colour scheme
elasticdogalmost 15 years ago
I'd advise putting your vim directory (or ALL of your dotfiles) under version control. To keep things clean, the first thing you should do is install Tim Pope's pathogen plugin which allows you to install each plugin in its own self-contained directory under ~/.vim/bundle/plugin-name/, and it will autoload everything for you.<p><pre><code> $ cd ~/.vim/ $ git init $ mkdir {autoload,bundle} $ wget -O autoload/pathogen.vim http://www.vim.org/scripts/download_script.php?src_id=12116 $ git add autoload/pathogen.vim $ git commit -m 'add pathogen.vim plugin' </code></pre> Then, you can just extract each plugin under that bundle directory, or if they're managed by the same version control software you're using, you can use something like git submodules to track the plugins automatically. Add this to the top of your ~/.vimrc file:<p><pre><code> filetype off call pathogen#runtime_append_all_bundles() filetype plugin indent on</code></pre> ...and you're off to the races. Let's say you want to add NERD_tree:<p><pre><code> $ git submodule add http://github.com/scrooloose/nerdtree.git bundle/nerdtree $ git submodule init $ git commit -m 'add nerd tree plugin as submodule' </code></pre> From then on, you'll be able to track upstream changes to the plugin, and everything is self-contained so you don't have to worry about copying all the files into /doc, /ftplugin, /syntax, etc. The one thing you'll want to do is generate all of the help docs after you have your plugins installed by loading up vim and running:<p><pre><code> :call pathogen#helptags() </code></pre> The list of what I use goes a little something like this:<p>@ pathogen - to cleanly organize all of your plugins<p>@ bufexplorer - to explore your open buffers<p>@ command-t - a better fuzzy finder for opening files<p>@ endwise - add proper end statements for ruby code<p>@ fugitive - fantastic git wrapper<p>@ matchit - jump to matching brackets or logical statements<p>@ nerdtree - navigate and manipulate files<p>@ pastie - post code to pastie.org<p>@ repeat - adds the ability to repeat functions with .<p>@ speeddating - Ctrl-A/Ctrl-X manipulate dates properly<p>@ surround - alter stuff that surrounds text like quotes and html tags<p>@ taglist - helpful source code browser<p>Beyond that, I have a bunch of syntax files for various languages and file formats.<p>Realistically though, if you're just starting out. Learn how to use the editor first, then if you notice certain use cases that you don't have with built-in features (and there are a TON), then start looking for plugins to make your life easier. There's a lot you can do with custom settings and functions in your ~/.vimrc file too, so it will take time (years) to build up what works best for you. Be patient, it's worth it!<p>If you're curious, you can always find gems by looking through other people's configs: <a href="http://github.com/elasticdog/dotfiles" rel="nofollow">http://github.com/elasticdog/dotfiles</a>
stralepalmost 15 years ago
If your language has REPL, I must recommend ConqueTerm.<p><a href="http://www.vim.org/scripts/script.php?script_id=2771" rel="nofollow">http://www.vim.org/scripts/script.php?script_id=2771</a>
rquirkalmost 15 years ago
vindect: vim indentation detection. Set the tabs vs spaces settings and shift width to what the file currently uses. Indispensable for hacking code someone else wrote.<p>a: flip between .c and .h files a bit easier.<p>snipMate: code snippets. Filling out the shebang line, and C/python main idioms in throwaway experiments are the main reason I use this.<p>vcscommand: I only really use VCSVimDiff, but it works great for viewing changes in the current file when using git, mercurial and subversion.<p>emacs: inspired by vimacs[0], I also fixed ex command line editing to work with readline/emacs keys. Mapping Alt in insert mode is really buggy, so I use to ctrl-g instead of esc.<p>patchreview: like diffpatch, but for multiple files and you can specify a base path.<p>I have a whole bunch of my own silly plugins that I've created over the years, mostly unreleased, that do lots of great stuff. The :make and :grep quickfix highlighting I lifted from eclim is particularly useful.<p>I miss emacs.vim and vindect the most when I use vim on some other machine that doesn't have them.<p>[0]: <a href="http://www.vim.org/scripts/script.php?script_id=300" rel="nofollow">http://www.vim.org/scripts/script.php?script_id=300</a>
Aegeanalmost 15 years ago
Fugitive. Cscope. taglist<p>I also have NERDTree but very seldomly use it.
评论 #1591852 未加载
x0talmost 15 years ago
None. I use vim on so many different machines, so it isn't feasible for me to move a bunch of plugins around. I'll very rarely use BufferList, if it's installed, I often forget it's there.<p>Here's my .vimrc: <a href="http://gist.github.com/517464" rel="nofollow">http://gist.github.com/517464</a><p>I like to use cursorcolumn and cursorline with low contrast colorschemes like obsidian or evening.<p>I've been using vim for 10-15 years.
评论 #1591873 未加载
bronsonalmost 15 years ago
A favorite that hasn't been mentioned yet: fix-whitespace, <a href="http://github.com/bronson/vim-trailing-whitespace" rel="nofollow">http://github.com/bronson/vim-trailing-whitespace</a> Highlights trailing whitespace in red and offers the :FixWhitespace command to obliterate it.
cosmokalmost 15 years ago
My favorite would be LustyExplorer: <a href="http://github.com/sjbach/lusty" rel="nofollow">http://github.com/sjbach/lusty</a> . Why? Among all the different file browser plugins, I found Lusty to be the most easiest to use while being intuitive.
rnicholsonalmost 15 years ago
Concur with the other recommended plugins here, but if you're doing any C or C++ reco a.vim
pgealmost 15 years ago
latex-suite; it's a must have if you write LaTeX docs. If you work in an office where everyone uses Word and PPT, being able to write docs in Vim, format with LaTeX and compile to PDF for distribution to others is handy.
zokieralmost 15 years ago
I have used vim some time now do not use any scripts. Only 3rd party thing I have is zenburn colorscheme. I would recommend learning vanilla vim properly first, then let it grow based on your needs with scripts.
kkovacsalmost 15 years ago
My .vim/GetLatest/GetLatestVimScripts.dat:<p>ScriptID SourceID Filename<p>--------------------------<p>642 1 :AutoInstall: getscript.vim<p>1075 1 :AutoInstall: netrw.vim<p>1502 1 :AutoInstall: vimball.vim<p>2010 1 :AutoInstall: sessionman.vim<p>1896 1 :AutoInstall: ragtag.zip<p>273 1 :AutoInstall: taglist.vim<p>1984 1 :AutoInstall: vim-fuzzyfinder.zip
ronnieralmost 15 years ago
I use a plugin to provide VIM emulation in Visual Studio. And that plugin itself doesn't allow plugins within it.<p><a href="http://www.viemu.com/" rel="nofollow">http://www.viemu.com/</a>
statictypealmost 15 years ago
dbext - An excellent plugin to execute sql against a db server from within vim - works with almost every major db engine.<p>snipmate - textmate like snippets. Works very well.<p>NERD_tree: As others have mentioned.<p>Not really a plugin but, this is useful for automatically closing your '(' and '[' and quotes etc... <a href="http://concisionandconcinnity.blogspot.com/2009/07/vim-part-ii-matching-pairs.html" rel="nofollow">http://concisionandconcinnity.blogspot.com/2009/07/vim-part-...</a>
remialmost 15 years ago
All the plugins I use: <a href="http://github.com/remiprev/vimfiles/tree/master/bundle/" rel="nofollow">http://github.com/remiprev/vimfiles/tree/master/bundle/</a><p>My favorites would be:<p>- surround<p>- zencoding-vim<p>- rails-vim<p>- yankrink<p>- nerd_commenter
sonnymalmost 15 years ago
Syntax Highlighting: vbnet.vim svndiff vim-rails vim-haml<p>Other: taglist Nerdtree matchit zoomwin dbtext
dakronealmost 15 years ago
Here's the short list:<p>* NERD_tree - Nice tree list of files for project browsing<p>* NERD_commenter - Mapped to ,c&#60;Spc&#62; to toggle between commenting and uncommenting<p>* SimpleFold - Folding that doesn't suck courtesy of the eigenclass blog<p>* a.vim - quickly alternate between a .c and .h file<p>* ack - way better searching than vimgrep or regular grep<p>* vimclojure - A must-have for Clojure dev in Vim &#60;3<p>* ctk - auto-compilation and syntax check for languages. I use it to check ruby files on save<p>* easytags - automatically generate the tags file for your buffers<p>* eclim - I develop enterprise Java, eclim keeps me sane by giving my almost all of Eclipse's useful features in Vim<p>* fuzzyfinder - great file-finding tool similar to Emacs' C-x C-f<p>* gist - automatically post your buffer to a gist, download gists etc, super handy<p>* localvimrc - allows me to have project-specific vimrcs<p>* matchit - for beter % matching<p>* narrow - Emacs'-style narrowing and widening<p>* netrw - edit files remotely over ftp/ssh/etc<p>* paredit - the paredit.vim file from the slimv plugin, doesn't work as well as Emacs' paredit, but it's semi-useful<p>* pastie - post your buffer to pastie<p>* rails - various helpers from the vim-ruby project for rails<p>* repeat - allows repeating things that aren't normally repeatable with '.'<p>* securemodelines - don't let people do mean things in modelines<p>* showmarks - I'm on the fence with this one, great if you use a lot of marks and want to show them<p>* slime - pipe text from a vim buffer to a screen session<p>* snipmate - Textmate-like snippets for various languages<p>* supertab - tab-completion that works pretty well, this + eclim is great for java dev<p>* surround - tools for messing with surroundings of files<p>* taglist - use ctags to display a tag list in a pane<p>* twitvim - seriously, why use a twitter client when you can use vim<p>* vimball - used to install a lot of vim plugins<p>* vimwiki - I store all of my tech-related text here<p>* visualstar - this lets you use '<i>' to search for more than just a single word<p></i> yankring - a ring of yanks when doing copy/paste<p>If I had to pick just one for a favorite, it'd be a tie between fuzzyfinder and NERD_tree, way better than manually trying to find the file to edit.<p>In addition there are quite a few filetype plugins for better syntax highlighting for the variety of languages I work with.<p>My entire vim setup dir can be found here: <a href="http://github.com/dakrone/dakrone-dotfiles" rel="nofollow">http://github.com/dakrone/dakrone-dotfiles</a>
fauigerzigerkalmost 15 years ago
NERDTree