I'm @dorkitude, and this is my vim repo.
After becoming as fast as possible with a combination of TextMate and Visor, I decided I needed more speed. A paradigm shift was in order. On April 9th, 2011, I switched to vim.
This repository is here to help people make a similar transition. There will be trial and error with key bindings, and with adding/removing extensions, but HEAD on master will serve as the current best practice (as defined by my own daily usage). That branch's commit history, meanwhile, will serve as the living documentation of my journey into vim.
UPDATE: On April 30th, 20011, I realized I had now become faster for most tasks than I ever was with TextMate/visor. And it's accelerating!
If you're new to vim, you should really watch all of Derek Wyatt's quirky/awesome tutorial videos here.
checkout the repo (the
--recursivewill force it to also checkout the submodules):
git clone --recursive git://github.com/dorkitude/Pimped-Vim.git
go to your home directory:
create symlink called
.vimrcand point it to
ln -s /path/to/Pimped-Vim/.vimrc .vimrc
create symlink called
.vimand point it to the folder
ln -s /path/to/Pimped-Vim/.vim/ .vim
Follow the installation instructions for Command-T. IMHO Command-T is absolutely essential to using vim for a project, and it requires you to have a version of vim compiled with Ruby support. Don't skip this!
Leaving insert mode
I stole Steve Losh's Quicker Escaping shortcut. If you type
jj while in insert mode, vim will exit to normal mode.
using git via the Fugitive plugin
My window motion bindings allow you to do this to move control windows:
CTRL+hmove control to the window to the left
CTRL+j= move control to the window below
CTRL+k= move control to the window above
CTRL+l= move control to the window to the right
(Normally, these would be
^w j etc)
This thing is amazing! It adds a new kind of target called a "surrounding", which means 'the area surrounding the current word'. Read some usage examples here.
Ack is the best way to search your codebase for a given pattern.
With my settings, you can just hit
,a and begin typing a pattern. Press
enter to perform the search. The results will show up in a vim quickfix window, which gives you shortcuts to the file and line of each search result (move your cursor to the desired result and press
enter to jump to that file/line).
The NERDtree project drawer
I have this mapped to F2. On my Mac, that means I press
fn + F2, since F2 alone will actually change my brightness.
You can activate Command-T with
The following mappings are active when the prompt has focus:
note on mac laptops
fn + <backspace> is equivalent to
<BS> delete the character to the left of the cursor <Del> delete the character at the cursor <Left> move the cursor one character to the left <C-h> move the cursor one character to the left <Right> move the cursor one character to the right <C-l> move the cursor one character to the right <C-a> move the cursor to the start (left) <C-e> move the cursor to the end (right) <C-u> clear the contents of the prompt <Tab> change focus to the file listing
The following mappings are active when the file listing has focus:
<Tab> change focus to the prompt
The following mappings are active when either the prompt or the file listing has focus:
<CR> open the selected file <C-CR> open the selected file in a new split window <C-s> open the selected file in a new split window <C-v> open the selected file in a new vertical split window <C-t> open the selected file in a new tab <C-j> select next file in the file listing <C-n> select next file in the file listing <Down> select next file in the file listing <C-k> select previous file in the file listing <C-p> select previous file in the file listing <Up> select previous file in the file listing <C-c> cancel (dismisses file listing)
The following is also available on terminals which support it:
<Esc> cancel (dismisses file listing)
Here's some crap I have to put in here to keep people from suing me.
Pimped-Vim is released under the
Basically: Do whatever you want with my stuff, just don't sue me. I make no warrantees about its use, blah blah blah, just live free and go create stuff!
You can find the Command-T License in the source for that extension. I believe it's in