# HG changeset patch # User Steve Losh # Date 1319223484 14400 # Node ID d5b9b72cba9f1947f583e3a7fea5f6fd843e34dc # Parent 00cfa7ffb0dd34095f1b64d2e61e223c9276b544 Formatting. diff -r 00cfa7ffb0dd -r d5b9b72cba9f vim/.vimrc --- a/vim/.vimrc Fri Oct 21 14:48:29 2011 -0400 +++ b/vim/.vimrc Fri Oct 21 14:58:04 2011 -0400 @@ -5,7 +5,7 @@ " This file changes a lot. I'll try to document pieces of it whenever I have " a few minutes to kill. -" Preamble -------------------------------------------------------------------- {{{ +" Preamble ---------------------------------------------------------------- {{{ filetype off call pathogen#runtime_append_all_bundles() @@ -13,7 +13,7 @@ set nocompatible " }}} -" Basic options --------------------------------------------------------------- {{{ +" Basic options ----------------------------------------------------------- {{{ set encoding=utf-8 set modelines=0 set autoindent @@ -113,7 +113,7 @@ " }}} " }}} -" Status line ----------------------------------------------------------------- {{{ +" Status line ------------------------------------------------------------- {{{ augroup ft_statuslinecolor au! @@ -148,7 +148,7 @@ set statusline+=\ (line\ %l\/%L,\ col\ %03c) " }}} -" Abbreviations --------------------------------------------------------------- {{{ +" Abbreviations ----------------------------------------------------------- {{{ function! EatChar(pat) let c = nr2char(getchar(0)) @@ -170,7 +170,7 @@ iabbrev vrcf `~/.vimrc` file " }}} -" Searching and movement ------------------------------------------------------ {{{ +" Searching and movement -------------------------------------------------- {{{ " Use sane regexes. nnoremap / /\v @@ -281,7 +281,7 @@ " }}} " }}} -" Folding --------------------------------------------------------------------- {{{ +" Folding ----------------------------------------------------------------- {{{ set foldlevelstart=0 @@ -314,10 +314,9 @@ set foldtext=MyFoldText() " }}} -" Destroy infuriating keys ---------------------------------------------------- {{{ +" Destroy infuriating keys ------------------------------------------------ {{{ " Fuck you, help key. -set fuoptions=maxvert,maxhorz noremap :set invfullscreen inoremap :set invfullscreena @@ -328,7 +327,7 @@ inoremap # X# " }}} -" Various filetype-specific stuff --------------------------------------------- {{{ +" Various filetype-specific stuff ----------------------------------------- {{{ " C {{{ @@ -645,7 +644,7 @@ " }}} " }}} -" Quick editing --------------------------------------------------------------- {{{ +" Quick editing ----------------------------------------------------------- {{{ nnoremap ev sjL:e $MYVIMRC nnoremap es sjL:e ~/.vim/snippets/ @@ -656,7 +655,7 @@ nnoremap ek sjL:e ~/lib/dotfiles/keymando/keymandorc.rb " }}} -" Shell ----------------------------------------------------------------------- {{{ +" Shell ------------------------------------------------------------------- {{{ function! s:ExecuteInShell(command) " {{{ let command = join(map(split(a:command), 'expand(v:val)')) @@ -676,7 +675,7 @@ nnoremap ! :Shell " }}} -" Convenience mappings -------------------------------------------------------- {{{ +" Convenience mappings ---------------------------------------------------- {{{ " Clean whitespace map W :%s/\s\+$//:let @/='' @@ -847,7 +846,7 @@ " }}} " }}} -" Plugin settings ------------------------------------------------------------- {{{ +" Plugin settings --------------------------------------------------------- {{{ " Ack {{{ @@ -859,11 +858,6 @@ nmap x ToggleAutoCloseMappings " }}} -" Command-T {{{ - -let g:CommandTMaxHeight = 20 - -" }}} " Commentary {{{ nmap c CommentaryLine @@ -1072,7 +1066,7 @@ " }}} " }}} -" Text objects ---------------------------------------------------------------- {{{ +" Text objects ------------------------------------------------------------ {{{ " Shortcut for [] {{{ @@ -1114,7 +1108,7 @@ " }}} " }}} -" Error toggles --------------------------------------------------------------- {{{ +" Error toggles ----------------------------------------------------------- {{{ command! ErrorsToggle call ErrorsToggle() function! ErrorsToggle() " {{{ @@ -1143,7 +1137,7 @@ nmap :QFixToggle " }}} -" Utils ----------------------------------------------------------------------- {{{ +" Utils ------------------------------------------------------------------- {{{ function! g:echodammit(msg) exec 'echom "----------> ' . a:msg . '"' @@ -1180,7 +1174,7 @@ " }}} " }}} -" Hg -------------------------------------------------------------------------- {{{ +" Hg ---------------------------------------------------------------------- {{{ function! s:HgDiff() diffthis @@ -1228,7 +1222,7 @@ nnoremap hb :HgBlame " }}} -" MacVim ---------------------------------------------------------------------- {{{ +" Environments (GUI/Console) ---------------------------------------------- {{{ if has('gui_running') set guifont=Menlo:h12 @@ -1240,10 +1234,19 @@ set go-=r set go-=R + highlight SpellBad term=underline gui=undercurl guisp=Orange + + " Use a line-drawing char for pretty vertical splits. + set fillchars+=vert:│ + + " Different cursors for different modes. + set guicursor=n-c:block-Cursor-blinkon0 + set guicursor+=v:block-vCursor-blinkon0 + set guicursor+=i-ci:ver20-iCursor + if has("gui_macvim") - " " PeepOpen on OS X, Command-T elsewhere. - " macmenu &File.New\ Tab key= - " map PeepOpen + " Full screen means FULL screen + set fuoptions=maxvert,maxhorz " Use the normal HIG movements, except for M-Up/Down let macvim_skip_cmd_opt_movement = 1 @@ -1268,31 +1271,14 @@ imap inoremap my0c`y else - " map :CommandT - - " Dammit, PeepOpen - " map gxxxxx PeepOpen + " Non-MacVim GUI, like Gvim end - - highlight SpellBad term=underline gui=undercurl guisp=Orange - - " Use a line-drawing char for pretty vertical splits. - set fillchars+=vert:│ - - " Different cursors for different modes. - set guicursor=n-c:block-Cursor-blinkon0 - set guicursor+=v:block-vCursor-blinkon0 - set guicursor+=i-ci:ver20-iCursor else - " Command-T if we don't have a GUI. - " map :CommandT - - " Dammit, PeepOpen - " map gxxxxx PeepOpen + " Console Vim endif " }}} -" Nyan! ----------------------------------------------------------------------- {{{ +" Nyan! ------------------------------------------------------------------- {{{ function! NyanMe() " {{{ hi NyanFur guifg=#BBBBBB