vimrc: Set modelines=0 to avoid security issues
[cmccabe-etc] / .vimrc
diff --git a/.vimrc b/.vimrc
index 0fc55ff..ce37af6 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -1,17 +1,17 @@
 
-"                Colin's vimrc                 
+"                Colin's vimrc
 "
 "            ||   www                %%%
 "     vwv    ||   )_(,;;;,        ,;,\_/ www
 "     )_(    ||   \|/ \_/         )_(\|  (_)
-"     \|   \ || /\\|/  |/         \| \|// | 
+"     \|   \ || /\\|/  |/         \| \|// |
 " "___\|//V\\||//_\V/_\|//_______\\|//V/\\|/__
 
-"*************** navigation *************** 
+"*************** navigation ***************
 set history=500
 set tags=./tags;../../../../
 
-"*************** search stuff *************** 
+"*************** search stuff ***************
 set incsearch
 set hlsearch
 set showmatch
@@ -19,7 +19,7 @@ set nowrapscan
 set ignorecase
 set smartcase
 
-"*************** formatting *************** 
+"*************** formatting ***************
 :filetype plugin on
 :filetype indent on
 set linebreak
@@ -28,26 +28,37 @@ set ruler
 syntax on
 highlight Comment ctermfg=darkcyan
 highlight Constant ctermfg=red
+highlight Search cterm=reverse
+highlight Error ctermfg=white ctermbg=1
 set t_Co=256
+set sw=4
+set ts=4
 set et
+set modelines=0
 
-"*************** bell *************** 
+"*************** bell ***************
 set vb t_vb="."
 set visualbell
-                                                                                
-"*************** movement stuff *************** 
+
+"*************** movement stuff ***************
 set splitbelow
 set splitright
-imap <BS> <ESC>
+"imap <BS> <ESC>
 set pastetoggle=<F2>
 
-"*************** gui stuff *************** 
-set guifont=fixed
+"*************** gui stuff ***************
+"set guifont=fixed
 set guioptions-=T
 set laststatus=2
 "noremap \ 2 <PageUp>
 
-"*************** colin's auto-commenter *************** 
+"*************** comand-mode stuff ***************
+" This abbreviation makes it easier to type :e <filename>.
+" When you type '%%' in command mode, it will be expanded to the directory name
+" of the file you're currently editing.
+cabbr <expr> %% expand('%:p:h')
+
+"*************** colin's auto-commenter ***************
 map ,/ :s/^/\/\//<CR>:nohlsearch<CR>
 map ,,/ :s/^\/\///<CR>:nohlsearch<CR>
 map ,# :s/^/#/<CR>:nohlsearch<CR>
@@ -58,15 +69,24 @@ map ,," :s/^\"//<CR>:nohlsearch<CR>
 " whitespace stripper
 map ,w :s/[\t ][\t ]*$//<CR>
 
+" More ergonomic key binding for omni-complete
+inoremap <C-k><C-k> <C-x><C-o>
+
 "*************** shortcuts **************
 map \b :ConqueTermSplit /bin/bash<CR>
 map \B :ConqueTermVSplit /bin/bash<CR>
 "command Bash execute ":ConqueTerm bash"
 
 "*************** grep plugin ***************
-:let Grep_Default_Filelist = '*.c *.cpp *.cc *.rb *.h *.t *.py *.rst *.go'
+:let Grep_Default_Filelist = '*.c *.cpp *.cc *.hpp *.rb *.h *.t *.py *.rst *.go *.java *.S *.scala'
 :let Grep_Skip_Files = 'core.* *.svn *~ *.swp *.swo *.bak cscope.out cscope.files'
 
 "*************** pre-filled registers ******************
-let @s="Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>"
 let @w="Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>"
+let @s="Signed-off-by: Colin Patrick McCabe <cmccabe@cloudera.com>"
+
+set t_Co=256
+highlight DiffAdd    ctermfg=NONE ctermbg=grey 
+highlight DiffDelete ctermfg=NONE ctermbg=grey
+highlight DiffChange ctermfg=NONE ctermbg=grey
+highlight DiffText   ctermfg=NONE ctermbg=grey