"USEFUL COMMANDS (NO CONFIG NEEDED): " :sp (filename) - loads filename in new split window. if no filename is " specified, the current file is loaded " Split window manipulation: " + " k - move up one split " j - move down one split " + - make this window bigger " - - make this window smaller " :(w)q - (write and) close this split " :TOhtml - creates HTML file from current file using syntax coloring " " HOW TO USE THE HELP FILES " The help files are a great resource, but they're a bit confusing to learn " For help on a topic, type :help " Links look like |this| - if you cursor over them and type , you'll " jump to that section of help. To get back to where you were, type syntax on colorscheme murphy set nocompatible " Use Vim defaults (much better!) set bs=2 " Allow backspacing over everything in insert mode set ai " Always set auto-indenting on "set backup " Keep a backup file set viminfo='20,\"50 " read/write a .viminfo file -- limit to only 50 set history=50 " keep 50 lines of command history set ruler " Show the cursor position all the time set ts=4 " 4 space wide tabs set sw=4 set softtabstop=4 "makes backspacing over spaced out tabs work real nice set expandtab "expand tabs to spaces set ignorecase set background=dark "awesome for terminals with crappy colors (putty!) set tagstack "lets you push and pop your jumps with ctrl+] set pastetoggle= "when you're pasting stuff this keeps it from getting "all whacked out with indentation set foldmethod=manual "enable code folding "javac in vim "set makeprg=javac\ % "set errorformat=%A%f:%l\ %m,%-Z%p^,%-C%.%# "gcc in vim set makeprg=gcc\ -o\ %<\ % "dictionary word autocomplete. type in the middle of a word to use set dictionary-=/usr/share/dict/words dictionary+=/usr/share/dict/words set complete-=k complete+=k "fix broken sun terminals (if we're stuck on one) set t_cl= " Don't use Ex mode, use Q for formatting map Q gq "collapsing window splits map j_ map k_ " remove ^M characters from windows files map mvggVG:s///g`v "cstags mapping map g :cs find 3 =expand("") map g :cs find 0 =expand("") "rot13 dmca-grade encryption "this is useful to obfuscate whatever it is that you're working on temporarily "if someone walks by (vim pr0n?) map mzggVGg?`z "don't expand tabs if we're in a makefile au BufRead,BufNewFile Makefile set ts=4 sw=4 noexpandtab autocmd BufNewFile,BufRead *.txt set tw=78 autocmd BufNewFile,BufRead *.tex set tw=80 "good tab completion - press to autocomplete if there's a character "previously function InsertTabWrapper() let col = col('.') - 1 if !col || getline('.')[col - 1] !~ '\k' return "\" else return "\" endif endfunction inoremap =InsertTabWrapper()