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