Useful Vim Plugins

Post on 13-Jan-2015

2.266 views 0 download

description

 

Transcript of Useful Vim Plugins

Vim Talk!

08/01/2011

Who am I?● Brian Racer● http://brianracer.com● @anveo● http://github.com/anveo/dotfiles

I have been using vim on a daily basis for about 5 years

Learn VIM Incrementally

● start slow● use a few ideas at a time until you

have committed them to muscle memory or internalized them

Should I use the Terminal or gVim/MacVim?

● I prefer the GUI clients● Nicer colors● No terminal binding clashes● MacVim has a nice fullscreen mode

● However, I want GUI vim to *look* like a terminal window○ remove all the chrome

Example of superior GUI color

● colorcolumn● line overflow

My FAVORITE Tip!

Swap your Caps Lock and Esc keys!

● you never use your caps lock key● useful outside of vim!

Remap Spacebar

● apparently I have weak pinkies and strain my wrists trying to make a colon

noremap <Space> :

Understand :paste mode

nmap <F3> :set paste<CR>nmap <F4> :set nopaste<CR>

Keep <leader><leader> free for misc tasks

:map ,, :ruby %<cr>

Quick ruby helpers

● symbol-ize a word● hash-rocket

Useful Vim Plugins

NERDTree

https://github.com/scrooloose/nerdtree

buffexplorer vs. minibufexpl

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

(use buffexplorer)

SuperTab continued

https://github.com/ervandew/supertab

Be sure to use the above version! SuperTab on vim.org has been discontinued.

snipMate.vim

https://github.com/msanders/snipmate.vim

● I suggest ignoring the snippets that are provided● bind a command to opening your snippet and reloading the snippets

matchit

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

Command-T

https://wincent.com/products/command-t

● fast file navigation● build with system ruby (rvm use system)● matches entire file path unlike textmate

ack.vimhttps://github.com/mileszs/ack.vim

● better than vim's grep● better than remapping vim's grep to ack

http://betterthangrep.com/

zoomWin.vim

http://mysite.verizon.net/astronaut/vim/index.html#ZOOMWIN

interactive_editor

https://github.com/jberkel/interactive_editor

● gem install 'interactive_editor'● require in ~/.irbrc

sparkup.vim

https://github.com/rstacruz/sparkup● ZenCoding for vim● selector expansion● element expansion

Tim Pope scripts

https://github.com/tpope

ragtag.vim

https://github.com/tpope/vim-ragtag

rails.vim

https://github.com/tpope/vim-rails

endwise

https://github.com/tpope/vim-endwise

surround

https://github.com/tpope/vim-surround

repeat

https://github.com/tpope/vim-repeat

fugitive.vim

https://github.com/tpope/vim-fugitive

● Amazing git integration within vim● Too awesome for this presentation● See vimcasts for a 5 part series on this plugin

pathogen

https://github.com/tpope/vim-pathogen

● More sane organization of plugins● Kind-of a bundler for vim● Makes it easy to try new plugins

</tpope>

gundo

http://sjl.bitbucket.org/gundo.vim/https://github.com/sjl/gundo.vim

● requires vim 7.3● vim must have python support

syntastic

https://github.com/scrooloose/syntastic/

NERDCommentor

https://github.com/scrooloose/nerdcommenter