165

What are your favorite (G)Vim plugins/scripts?

cschol
  • 12,025
  • 11
  • 62
  • 78

38 Answers38

97

Nerdtree

The NERD tree allows you to explore your filesystem and to open files and directories. It presents the filesystem to you in the form of a tree which you manipulate with the keyboard and/or mouse. It also allows you to perform simple filesystem operations.

The tree can be toggled easily with :NERDTreeToggle which can be mapped to a more suitable key. The keyboard shortcuts in the NERD tree are also easy and intuitive.

Edit: Added synopsis

Naseer
  • 1,705
  • 2
  • 21
  • 22
60

Tim Pope has some kickass plugins. I love his surround plugin.

wilhelmtell
  • 53,297
  • 19
  • 89
  • 128
43

Pathogen plugin and more things commented by Steve Losh

SergioAraujo
  • 8,735
  • 1
  • 46
  • 37
  • 4
    Pathogen is the FIRST plugin you have to install on every Vim installation! It resolves the plugin management problems every Vim developer has. – Patrizio Rullo Sep 26 '11 at 12:11
  • 8
    I would recommend switching to [Vundle](https://github.com/gmarik/vundle). It’s better by a long shot and truly automates. You can give [vim-addon-manager](https://github.com/MarcWeber/vim-addon-manager) a try, too. – Profpatsch Apr 12 '13 at 08:53
28

Taglist, a source code browser plugin for Vim, is currently the top rated plugin at the Vim website and is my favorite plugin.

JPaget
  • 939
  • 9
  • 13
  • 11
    A more recent alternative to this is [Tagbar](http://majutsushi.github.com/tagbar), which appears to have some improvements over Taglist. [This blog post](http://asktherelic.com/2011/06/06/vim-plugin:-tagbar) offers a comparison between the two plugins. – mindthief Jun 27 '12 at 20:53
27

I love snipMate. It's simular to snippetsEmu, but has a much better syntax to read (like Textmate).

1passenger
  • 451
  • 7
  • 16
25

A very nice grep replacement for GVim is Ack. A search plugin written in Perl that beats Vim's internal grep implementation and externally invoked greps, too. It also by default skips any CVS directories in the project directory, e.g. '.svn'. This blog shows a way to integrate Ack with vim.

cschol
  • 12,025
  • 11
  • 62
  • 78
22

A.vim is a great little plugin. It allows you to quickly switch between header and source files with a single command. The default is :A, but I remapped it to F2 reduce keystrokes.

Dominic Dos Santos
  • 2,265
  • 2
  • 16
  • 28
19

I really like the SuperTab plugin, it allows you to use the tab key to do all your insert completions.

WMR
  • 11,971
  • 4
  • 30
  • 29
18

I have recently started using a plugin that highlights differences in your buffer from a previous version in your RCS system (Subversion, git, whatever). You just need to press a key to toggle the diff display on/off. You can find it here: http://github.com/ghewgill/vim-scmdiff. Patches welcome!

Greg Hewgill
  • 828,234
  • 170
  • 1,097
  • 1,237
  • Do you know if this supports bitkeeper? I looked on the website but couldn't even see whom to ask. – Nathan Fellman Sep 15 '08 at 18:51
  • It doesn't explicitly support bitkeeper at the moment, but as long as bitkeeper has a "diff" command that outputs a normal patch file, it should be easy enough to add. – Greg Hewgill Sep 16 '08 at 09:26
  • @Yogesh: No, it doesn't support ClearCase at this time. However, if you can add ClearCase support, a patch would certainly be accepted. – Greg Hewgill Mar 10 '10 at 01:39
  • This version can be loaded via pathogen in a git submodule: https://github.com/tomasv/vim-scmdiff – Olical Jan 23 '13 at 11:05
17
  1. Elegant (mini) buffer explorer - This is the multiple file/buffer manager I use. Takes very little screen space. It looks just like most IDEs where you have a top tab-bar with the files you've opened. I've tested some other similar plugins before, and this is my pick.
  2. TagList - Small file explorer, without the "extra" stuff the other file explorers have. Just lets you browse directories and open files with the "enter" key. Note that this has already been noted by previous commenters to your questions.
  3. SuperTab - Already noted by WMR in this post, looks very promising. It's an auto-completion replacement key for Ctrl-P.
  4. Desert256 color Scheme - Readable, dark one.
  5. Moria color scheme - Another good, dark one. Note that it's gVim only.
  6. Enahcned Python syntax - If you're using Python, this is an enhanced syntax version. Works better than the original. I'm not sure, but this might be already included in the newest version. Nonetheless, it's worth adding to your syntax folder if you need it.
  7. Enhanced JavaScript syntax - Same like the above.

  8. EDIT: Comments - Great little plugin to [un]comment chunks of text. Language recognition included ("#", "/", "/* .. */", etc.) .

Community
  • 1
  • 1
Ory Band
  • 11,650
  • 14
  • 52
  • 64
13

Not a plugin, but I advise any Mac user to switch to the MacVim distribution which is vastly superior to the official port.

As for plugins, I used VIM-LaTeX for my thesis and was very satisfied with the usability boost. I also like the Taglist plugin which makes use of the ctags library.

Konrad Rudolph
  • 482,603
  • 120
  • 884
  • 1,141
13

clang complete - the best c++ code completion I have seen so far. By using an actual compiler (that would be clang) the plugin is able to complete complex expressions including STL and smart pointers.

Yariv
  • 459
  • 6
  • 10
9

No one said matchit yet ? Makes HTML / XML soup much nicer http://www.vim.org/scripts/script.php?script_id=39

Greg Bowyer
  • 1,634
  • 12
  • 14
9

Tomas Restrepo posted on some great Vim scripts/plugins. He has also pointed out some nice color themes on his blog, too. Check out his Vim category.

carlosdc
  • 11,578
  • 3
  • 38
  • 60
David Mohundro
  • 10,902
  • 5
  • 37
  • 43
8

With version 7.3, undo branches was added to vim. A very powerful feature, but hard to use, until Steve Losh made Gundo which makes this feature possible to use with a ascii representation of the tree and a diff of the change. A must for using undo branches.

HaskellElephant
  • 9,388
  • 4
  • 34
  • 66
7

My latest favourite is Command-T. Granted, to install it you need to have Ruby support and you'll need to compile a C extension for Vim. But oy-yoy-yoy does this plugin make a difference in opening files in Vim!

wilhelmtell
  • 53,297
  • 19
  • 89
  • 128
  • Definitely! Let not the ruby + c compiling stop you, you will be amazed on how well this plugin enhances your toolset. I have been ignoring this plugin for too long, installed it today and already find myself using NERDTree lesser and lesser. – Victor Farazdagi Apr 19 '11 at 19:16
  • 11
    With ctrlp now there is something as awesome as Command-T written in pure Vimscript! It's available at https://github.com/kien/ctrlp.vim – datentyp Jan 11 '12 at 12:54
  • just my 2 cents.. being a naive user of both plugins, with a few first characters of file name i saw a much better result with commandt plugin and a lots of false positives for ctrlp. – FUD Dec 26 '12 at 04:48
7

Conque Shell : Run interactive commands inside a Vim buffer

Conque is a Vim plugin which allows you to run interactive programs, such as bash on linux or powershell.exe on Windows, inside a Vim buffer. In other words it is a terminal emulator which uses a Vim buffer to display the program output.

http://code.google.com/p/conque/

http://www.vim.org/scripts/script.php?script_id=2771

f3lix
  • 27,786
  • 10
  • 63
  • 82
7

Matrix Mode.

Auguste
  • 833
  • 10
  • 11
5

The vcscommand plugin provides global ex commands for manipulating version-controlled source files and it supports CVS,SVN and some other repositories.

You can do almost all repository related tasks from with in vim:
* Taking the diff of current buffer with repository copy
* Adding new files
* Reverting the current buffer to the repository copy by nullifying the local changes....

Naga Kiran
  • 8,006
  • 5
  • 39
  • 49
5

Just gonna name a few I didn't see here, but which I still find extremely helpful:

  • Gist plugin - Github Gists (Kind of Githubs answer to Pastebin, integrated with Git for awesomeness!)
  • Mustang color scheme (Can't link directly due to low reputation, Google it!) - Dark, and beautiful color scheme. Looks really good in the terminal, and even better in gVim! (Due to 256 color support)
Sirupsen
  • 1,926
  • 2
  • 18
  • 24
5

One Plugin that is missing in the answers is NERDCommenter, which let's you do almost anything with comments. For example {add, toggle, remove} comments. And more. See this blog entry for some examples.

thestoneage
  • 142
  • 1
  • 10
4

I like taglist and fuzzyfinder, those are very cool plugin

james
  • 1
  • 1
4

TaskList

This script is based on the eclipse Task List. It will search the file for FIXME, TODO, and XXX (or a custom list) and put them in a handy list for you to browse which at the same time will update the location in the document so you can see exactly where the tag is located. Something like an interactive 'cw'

JAVH
  • 1
  • 1
3

If you're on a Mac, you got to use peepopen, fuzzyfinder on steroids.

julienXX
  • 68
  • 2
3

I really love the snippetsEmu Plugin. It emulates some of the behaviour of Snippets from the OS X editor TextMate, in particular the variable bouncing and replacement behaviour.

Peter Hoffmann
  • 48,060
  • 14
  • 71
  • 58
3

Zenburn color scheme and good fonts - [Droid Sans Mono](http://en.wikipedia.org/wiki/Droid_(font)) on Linux, Consolas on Windows.

2

For vim I like a little help with completions. Vim has tons of completion modes, but really, I just want vim to complete anything it can, whenver it can.

I hate typing ending quotes, but fortunately this plugin obviates the need for such misery.

Those two are my heavy hitters.

This one may step up to roam my code like an unquiet shade, but I've yet to try it.

chiggsy
  • 7,405
  • 5
  • 31
  • 42
2

Txtfmt (The Vim Highlighter) Screenshots

The Txtfmt plugin gives you a sort of "rich text" highlighting capability, similar to what is provided by RTF editors and word processors. You can use it to add colors (foreground and background) and formatting attributes (all combinations of bold, underline, italic, etc...) to your plain text documents in Vim.

The advantage of this plugin over something like Latex is that with Txtfmt, your highlighting changes are visible "in real time", and as with a word processor, the highlighting is WYSIWYG. Txtfmt embeds special tokens directly in the file to accomplish the highlighting, so the highlighting is unaffected when you move the file around, even from one computer to another. The special tokens are hidden by the syntax; each appears as a single space. For those who have applied Vince Negri's conceal/ownsyntax patch, the tokens can even be made "zero-width".

2

I use the following two plugins all the time:

  • project
  • vimoutliner
Peter Stuifzand
  • 4,813
  • 1
  • 20
  • 28
2

tcomment

"I map the "Command + /" keys so i can just comment stuff out while in insert mode imap :i

Paul
  • 161
  • 2
  • 10
1

I take buftabs.vim and localvimrc.vim with me whereever I go!

buftabs : Minimalistic buffer tabs saving screen space

Local configuration : Use different settings for different directories.

Community
  • 1
  • 1
Johan Kotlinski
  • 23,690
  • 9
  • 73
  • 100
  • Another local config plugin: http://www.vim.org/scripts/script.php?script_id=441 –  Oct 17 '10 at 11:59
1

Try trinity

It has :

1) NerdTree

2) SourceExplorer

3) TagList

Aman Jain
  • 9,959
  • 14
  • 44
  • 60
1

Mark

  • It supports Multiple Highliting.
Benjamin
  • 8,715
  • 14
  • 72
  • 121
1

xptemplate

intelligent snippet management:

http://www.vimeo.com/7614329

Paul
  • 161
  • 2
  • 10
0

neocomplcache, the it behave a few like scribes autocompletion.

tfmoraes
  • 706
  • 1
  • 7
  • 18
0

vimtabs in gvim. Awesome and quick way to switch between buffers without wasting any space.

ThiefMaster
  • 285,213
  • 77
  • 557
  • 610
0

During maintenance of a very big and old C++ project I've created two plugins and these are the only ones I use:

0scan substitute for me taglist, buflist, files explorers, and other things like quick convenience file search.

SourceCodeObedience is very convenient cscope and ctags code surfing with stored history of all your searches with 'Filter' feature.

I use them not because they are mine but because they do the complete job and helps me to maintain of ~1Gb unfamiliar code base.

Mykola Golubyev
  • 52,197
  • 14
  • 81
  • 101
0

DirDiff

Vim's very own directory differ.

lang2
  • 9,253
  • 14
  • 67
  • 110