Useful Vim Plugins

34
Vim Talk! 08/01/2011

description

 

Transcript of Useful Vim Plugins

Page 1: Useful Vim Plugins

Vim Talk!

08/01/2011

Page 2: Useful Vim Plugins

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

Page 3: Useful Vim Plugins

Learn VIM Incrementally

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

have committed them to muscle memory or internalized them

Page 4: Useful Vim Plugins

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

Page 5: Useful Vim Plugins

Example of superior GUI color

● colorcolumn● line overflow

Page 6: Useful Vim Plugins
Page 7: Useful Vim Plugins

My FAVORITE Tip!

Swap your Caps Lock and Esc keys!

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

Page 8: Useful Vim Plugins

Remap Spacebar

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

noremap <Space> :

Page 9: Useful Vim Plugins

Understand :paste mode

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

Page 10: Useful Vim Plugins

Keep <leader><leader> free for misc tasks

:map ,, :ruby %<cr>

Page 11: Useful Vim Plugins

Quick ruby helpers

● symbol-ize a word● hash-rocket

Page 12: Useful Vim Plugins

Useful Vim Plugins

Page 13: Useful Vim Plugins

NERDTree

https://github.com/scrooloose/nerdtree

Page 14: Useful Vim Plugins

buffexplorer vs. minibufexpl

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

(use buffexplorer)

Page 15: Useful Vim Plugins

SuperTab continued

https://github.com/ervandew/supertab

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

Page 16: Useful Vim Plugins

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

Page 17: Useful Vim Plugins

matchit

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

Page 18: Useful Vim Plugins

Command-T

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

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

Page 19: Useful Vim Plugins

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

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

http://betterthangrep.com/

Page 20: Useful Vim Plugins

zoomWin.vim

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

Page 21: Useful Vim Plugins

interactive_editor

https://github.com/jberkel/interactive_editor

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

Page 22: Useful Vim Plugins

sparkup.vim

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

Page 23: Useful Vim Plugins

Tim Pope scripts

https://github.com/tpope

Page 24: Useful Vim Plugins

ragtag.vim

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

Page 25: Useful Vim Plugins

rails.vim

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

Page 26: Useful Vim Plugins

endwise

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

Page 27: Useful Vim Plugins

surround

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

Page 28: Useful Vim Plugins

repeat

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

Page 29: Useful Vim Plugins

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

Page 30: Useful Vim Plugins

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

Page 31: Useful Vim Plugins

</tpope>

Page 32: Useful Vim Plugins

gundo

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

● requires vim 7.3● vim must have python support

Page 33: Useful Vim Plugins

syntastic

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

Page 34: Useful Vim Plugins

NERDCommentor

https://github.com/scrooloose/nerdcommenter