057107bcd3d2c4572866f9fa6a1702c3e51154fc
[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 et
35
36 "*************** bell ***************
37 set vb t_vb="."
38 set visualbell
39
40 "*************** movement stuff ***************
41 set splitbelow
42 set splitright
43 imap <BS> <ESC>
44 set pastetoggle=<F2>
45
46 "*************** gui stuff ***************
47 "set guifont=fixed
48 set guioptions-=T
49 set laststatus=2
50 "noremap \ 2 <PageUp>
51
52 "*************** comand-mode stuff ***************
53 " This abbreviation makes it easier to type :e <filename>.
54 " When you type '%%' in command mode, it will be expanded to the directory name
55 " of the file you're currently editing.
56 cabbr <expr> %% expand('%:p:h')
57
58 "*************** colin's auto-commenter ***************
59 map ,/ :s/^/\/\//<CR>:nohlsearch<CR>
60 map ,,/ :s/^\/\///<CR>:nohlsearch<CR>
61 map ,# :s/^/#/<CR>:nohlsearch<CR>
62 map ,,# :s/^#//<CR>:nohlsearch<CR>
63 map ," :s/^/\"/<CR>:nohlsearch<CR>
64 map ,," :s/^\"//<CR>:nohlsearch<CR>
65
66 " whitespace stripper
67 map ,w :s/[\t ][\t ]*$//<CR>
68
69 "*************** shortcuts **************
70 map \b :ConqueTermSplit /bin/bash<CR>
71 map \B :ConqueTermVSplit /bin/bash<CR>
72 "command Bash execute ":ConqueTerm bash"
73
74 "*************** grep plugin ***************
75 :let Grep_Default_Filelist = '*.c *.cpp *.cc *.rb *.h *.t *.py *.rst *.go *.java *.S'
76 :let Grep_Skip_Files = 'core.* *.svn *~ *.swp *.swo *.bak cscope.out cscope.files'
77
78 "*************** pre-filled registers ******************
79 let @w="Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>"
80 let @x="Signed-off-by: Colin Patrick McCabe <cmccabe@acceptas.com>"
81 let @s="Signed-off-by: Colin Patrick McCabe <cmccabe@nvidia.com>"