vimrc: Set modelines=0 to avoid security issues
[cmccabe-etc] / .vimrc
1
2 "                Colin's vimrc
3 "
4 "            ||   www                %%%
5 "     vwv    ||   )_(,;;;,        ,;,\_/ www
6 "     )_(    ||   \|/ \_/         )_(\|  (_)
7 "     \|   \ || /\\|/  |/         \| \|// |
8 " "___\|//V\\||//_\V/_\|//_______\\|//V/\\|/__
9
10 "*************** navigation ***************
11 set history=500
12 set tags=./tags;../../../../
13
14 "*************** search stuff ***************
15 set incsearch
16 set hlsearch
17 set showmatch
18 set nowrapscan
19 set ignorecase
20 set smartcase
21
22 "*************** formatting ***************
23 :filetype plugin on
24 :filetype indent on
25 set linebreak
26 set ai
27 set ruler
28 syntax on
29 highlight Comment ctermfg=darkcyan
30 highlight Constant ctermfg=red
31 highlight Search cterm=reverse
32 highlight Error ctermfg=white ctermbg=1
33 set t_Co=256
34 set sw=4
35 set ts=4
36 set et
37 set modelines=0
38
39 "*************** bell ***************
40 set vb t_vb="."
41 set visualbell
42
43 "*************** movement stuff ***************
44 set splitbelow
45 set splitright
46 "imap <BS> <ESC>
47 set pastetoggle=<F2>
48
49 "*************** gui stuff ***************
50 "set guifont=fixed
51 set guioptions-=T
52 set laststatus=2
53 "noremap \ 2 <PageUp>
54
55 "*************** comand-mode stuff ***************
56 " This abbreviation makes it easier to type :e <filename>.
57 " When you type '%%' in command mode, it will be expanded to the directory name
58 " of the file you're currently editing.
59 cabbr <expr> %% expand('%:p:h')
60
61 "*************** colin's auto-commenter ***************
62 map ,/ :s/^/\/\//<CR>:nohlsearch<CR>
63 map ,,/ :s/^\/\///<CR>:nohlsearch<CR>
64 map ,# :s/^/#/<CR>:nohlsearch<CR>
65 map ,,# :s/^#//<CR>:nohlsearch<CR>
66 map ," :s/^/\"/<CR>:nohlsearch<CR>
67 map ,," :s/^\"//<CR>:nohlsearch<CR>
68
69 " whitespace stripper
70 map ,w :s/[\t ][\t ]*$//<CR>
71
72 " More ergonomic key binding for omni-complete
73 inoremap <C-k><C-k> <C-x><C-o>
74
75 "*************** shortcuts **************
76 map \b :ConqueTermSplit /bin/bash<CR>
77 map \B :ConqueTermVSplit /bin/bash<CR>
78 "command Bash execute ":ConqueTerm bash"
79
80 "*************** grep plugin ***************
81 :let Grep_Default_Filelist = '*.c *.cpp *.cc *.hpp *.rb *.h *.t *.py *.rst *.go *.java *.S *.scala'
82 :let Grep_Skip_Files = 'core.* *.svn *~ *.swp *.swo *.bak cscope.out cscope.files'
83
84 "*************** pre-filled registers ******************
85 let @w="Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>"
86 let @s="Signed-off-by: Colin Patrick McCabe <cmccabe@cloudera.com>"
87
88 set t_Co=256
89 highlight DiffAdd    ctermfg=NONE ctermbg=grey 
90 highlight DiffDelete ctermfg=NONE ctermbg=grey
91 highlight DiffChange ctermfg=NONE ctermbg=grey
92 highlight DiffText   ctermfg=NONE ctermbg=grey