dotvim
dotvim copied to clipboard
My modifications to Adam's vim setup.
=== Dotvim
This is the contents of my .vim directory. It includes my vimrc, which you should symlink to ~/.vimrc in order to get the goodness.
It includes several plugins: Git-vim, Gist, NERDtree, FuzzyFinder, FuzzyFinderTextmate, lots of color schemes, updated ruby bindings, and more.
To use, copy this directory to ~/.vim and symlink ~/.vim/vimrc to ~/.vimrc.
== Introduction Fugitive provides:
- Super-duper git functionality.
- http://github.com/tpope/vim-fugitive
NerdTree provides:
- A TextMate style 'project drawer'
- A built in filesystem explorer
FuzzyFinder(Textmate) provides:
- A TextMate style 'cmd-t' buffer switching interface
- An 'open buffers' tab-esque interface
Ack provides:
- Awesome code grepping
Taglist provides:
- Easy source code browsing
- Must have exuberant ctags installed
- Set to auto-populate behind the scenes
Surround provides:
- Setting or replacing text that surrounds lines
NERD_Commenter provides:
- Super smart comment control
Gist provides:
- Integrated gist support
== Commands
=== Git
[:GitAdd
=== Ack [:Ack] Takes options, a pattern, and a directory. Shows results in a quickbuffer. [:AckAdd] Like Ack + grepadd - adds to, rather than replaces, the quickbuffer. [:LAck] Ack + lgrep - opens in location-list [:LAckAdd] Appends to the location list
=== Tags [:TlistOpen] Opens the tag list window [:TlistToggle] Toggle the tag list window
=== Surround Details follow on the exact semantics, but first, consider the following examples. An asterisk (*) is used to denote the cursor position.
Old text Command New text ~
"Hello world!" ds" Hello world!
[123+456]/2 cs]) (123+456)/2
"Look ma, I'm *HTML!" cs"
Look ma, I'm HTML!
if *x>3 { ysW( if ( x>3 ) {
my $str = *whee!; vlllls' my $str = 'whee!';
[ds] = Delete surrounding - use the character or a 't' for tag (ds", dst) [cs] = Change surrounding - first what to change, then what to change to [ys] = Takes a motion and surrounds it with the second argument, like cs [s] = In visual mode, wraps the text with the character argument
=== NERD_commenter
[,cc] = Comment the current line, or selected text in visual mode [,c ] = Toggle the comment [,ci] = Toggles the set of lines individually (like "c ", but assumes each line may have different settings) [,cs] = Comment Sexily - up close to the start of each line [,cA] = Append a comment to the end of the line [,cl] = Comment and align on the left side [,cb] = Comment and align on both sides [,cu] = Uncomment the selected lines
=== Gist [:Gist] = post the whole text to gist [:'<,'>Gist] = post the selected text to gist [:Gist -p] = post wholet ext to gist with private [:Gist -a] = post the whole text to gist with anonymous [:Gist -e] = Edit the gist [:Gist -e foo.js] = Edit the gist with the name 'foo.js' [:Gist XXXXX] = Get gist [:Gist -c XXXXX] = Get gist and put to clipboard [:Gist -l] = List my gists [:Gist -la] = List gists from all
=== Textile
[,rp] = :TextilePreview - render textile to a temp file, open in browser [,rt] = :TextileRenderTab - render textile to a new tab [,rf] = :TextileREdnerFile - render to a file
== Keymaps
[,d] = Toggle NERDtree
[,t] = FuzzyFinderTextmate
[,b] = FuzzyBufferFinder
[,l] = TListToggle
[,gd] :GitDiff
[,gD] :GitDiff --cached
[,gs] :GitStatus
[,gl] :GitLog
[,ga] :GitAdd
[,gA] :GitAdd
=== In git-status buffer
[<Enter>] :GitAdd
== Rake
You can use the rake 'install' task to install this in your home directory.
== Windows
This will also work on Windows. A few notes.
Windows default vimrc location is C:\Users\username_vimrc. User home directory doesn't have plugins, syntax, etc, use C:\Program Files\Vim\vim72. PowerShell works for sure. cmd.exe might not. May need to start PowerShell/CMD as Administrator to get it to install.
== Credits
People who have worked on this Vim configuration are:
Joshua Timberman http://github.com/jtimberman/dotvim Email: [email protected]
AJ Christensen http://github.com/fujin/dotvim Email: [email protected]
Adam Jacob http://github.com/adamhjk/adam-vim/ Email: [email protected]
Original: Bram Moolenaar [email protected] Last change: 2002 Sep 19