Channeleaton's Vim Setup
Installed Plugins
- Align - Easily align text
- AutoClose - Automatically create matching closing symbols. Saves a ton of typing.
- Buffergator - Visual buffer managment
- CtrlP - Open files and buffers with lightning quick speed!
- Fugitive - Exceptional Git intigration for Vim
- Genutils - Generally useful utilities
- Gist - Create and edit Gists right in Vim
- Markdown - Syntax highlighting for Markdown
- Multvals - Dependencies
- snipMate - Save snippets for any filetype
- snipMate-snippets - Extra awesome snippets for snipMate
- SuperTab - Insert mode Tab completion!
- Surround - Surround your text in love...or brackets, quotation marks, etc.
- NERDCommenter- Comment your code like a pro.
- NERDTree- Visual folder/file navigation
- tlib - Required for SnipMate. Provides other utility functions.
- VimWiki - Have your very own wiki inside Vim.
- Vundle - The best Vim plugin manager
- ZenCoding - Easily create structured HTML
- ZoomWin - Zoom in and out of windows
Basic Customizations
- Changed
<leader>
to,
- Turned on linenumbers, ruler, and syntax highlighting
- Made it easy to navigate wrapped lines using
<D-j>
,<D-k>
and other movements. - Included Fugitive on the status line
- Added shortcuts to change windows like
<c-j>
and<c-k>
- Added shortcut to open .vimrc
<leader>v
and reload .vimrc<leader>V
- Re-mapped
;
to:
. Fewer keystrokes FTW! jj
now escapes to normal mode<leader>n
toggles NERDTree- Added Date/Time insertion shortcuts. Makes using the VimWiki diary easy to do work logs.
<Leader><Leader>
triggers:ZoomWin
:Gstatus
and:Gcommit
have been remapped to<Leader>gs
and<Leader>gc
respectivelyCmd-T
opens the CtrlP window
Quick Plugin Help
Buffergator
Open the Buffergator window by pressing <leader>b
.
h,j,k,l
are used as movement keys42<CR>
will open buffer number 42 in the previous windowgo
to open the selected buffer but keep the focus on Buffergator
CtrlP
- Use
..
and theEnter
key to navigate up a directory Ctrl-v
opens the selected file in a vertical splitCtrl-y
creates a new file and all associated directoriesCtrl b
switches to buffer search mode
Fugitive
Call up Git commands :Gstatus
:Gcommit
:Git push
etc.
:Gstatus
will display a split window with the staged/unstaged changes. Stage the wanted files by pressing \-
:Gcommit
will allow you to type a commit message. Save the commit by typing :wq
.
Gist
:Gist
Posts whole text to Gist.
:'<,'>Gist
Posts the selected text to Gist.
:Gist -a
Posts whole text to Gist anonymously.
:Gist XXXXX
Get Gist #XXXXX
:Gist -l
List all of your Gists
NERDCommenter
<leader>cc
Comments out the current line or text selected in visual mode.
<leader>cs
Creates a good looking comment block
<leader>ca
Adds comment delimiters at the end of the line and goes to insert mode between them.
<leader>cu
Uncomments the current line or selected text.
NERDTree
VimWiki
Vundle
ZenCoding
Ctrl-y ,
expands the preceeding text.Ctrl-y n
skips to the next editing pointCtrl-y m
will merge lines selected in visual mode
How does it work? If you type html:5
then execute the keystrokes, it will expand to this:
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
_
</body>
</html>
You can download the Zen Coding cheatsheet here