VIM Essential Plug-ins

Plugins

Being one of the favourite editors, I did some analysis to make it effective while dealing with large code base. Here are some outcomes in the form of external plug-ins:

  • FuzzyFinder – http://www.vim.org/scripts/script.php?script_id=1984
    Helps in quick file search, file buffering, pattern search and lots more. This can be considered as superset of BufExplorer, NerdTree, and Taglist plug-ins. It is quite ingenious in finding patterns. Install plugin including depedancy of l9 as mentioned on above link. FuzzyFinder explores database created by ctags to search, run following command to create one:

     $ ctags -R --extra=+f --exclude="*.html" -exclude="*.tex"

    This includes files and directory information to ctags database, excluding un-wanted files.
    Some useful commands for FuzzyFinder are:
    |:FufBufferTag| – Buffer-Tag mode (|fuf-buffertag-mode|)
    |:FufTaggedFile| – Tagged-File mode (|fuf-taggedfile-mode|)
    |:FufBuffer| – Buffer mode (|fuf-buffer-mode|)
    |:FufFile| – File mode (|fuf-file-mode|)

  • BufExplorer – http://www.vim.org/scripts/script.php?script_id=42
    Bufexplorer provides a basic interface to manage multiple buffers in vim.
  • NERDTree – http://www.vim.org/scripts/script.php?script_id=1658
    The NERD tree allows you to explore your filesystem and to open files and directories.
  • CCTree – http://www.vim.org/scripts/script.php?script_id=2368
    To view static call graph using database created by CScope.
  • DrawIT – http://www.vim.org/scripts/script.php?script_id=40
    A nice plugin for ASCII drawing, useful especially to create block diagrams quickly.

Of course there are few more to above list but I will let you figure out them. These little contributions make development a lot effective! Thanks to contributors!

Handy commands

  • :browse oldfiles — Browse and open recently used file
  • :%s/foo/bar/g — To replace “foo” by “bar” throughout file
  • :!ls — Run bash command (here it lists files in cwd) without leaving vim
  • :tag <name> — Find a tag with specified name
  • :n <file> — open up file
  • :split <file> — open up file splitting current window horizontally
  • :vs <file> — open up file splitting current window vertically
  • :Explore — opens up directory listing of files at level of current open file, split window if current file is modified
  • :SExplore — split and explore directory listing
Advertisements
This entry was posted in Linux and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s