Repository navigation
Expand file tree
/
Copy pathdot_vimrc
More file actions
91 lines (69 loc) · 2.5 KB
/
Copy pathdot_vimrc
File metadata and controls
91 lines (69 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
""
" .vimrc
"
set nocompatible " be iMproved
filetype off " required!
set nobackup
filetype plugin indent on " required!
"" general vim stuff
set sw=2 " shift width
set et " expand tabs. use 8 spaces instead of a tab.
set nocp " no compatibility
set ru " ruler
set sc " show commands as they're typed
set wmnu " wild menus for filename completion
set ww=<,>,h,l " let arrow keys, h, l move off ends of lines
set scrolloff=2 " show this many extra lines while scrolling
set hidden " allow hidden unsaved buffers
set foldcolumn=0
set nopaste
"" Search
set hlsearch " highlighed searches
set noincsearch " Incremental search
set ignorecase " Make case-insenstive searches
set smartcase " unless they contain at least one capital letter
set nolinebreak " This displays long lines as wrapped at word boundries
set nobackup " Don't keep a backup file
set writebackup
set textwidth=0 " Don't wrap words by default
"" Tab control
set tabstop=2
set shiftwidth=2
set expandtab
"" Line Numbering. Use numbers by default, ctrl-N twice to disable
set number
set numberwidth=4
nmap <C-N><C-N> :set invnumber<CR>
"" filetype stuff
au BufNewFile,BufRead *.c,*.h set filetype=cpp " treat .c files as C++
au BufNewFile,BufRead *.m,*.mi setf mason
au BufNewFile,BufRead *.rb set sw=2
filetype plugin on
filetype indent on
:au Filetype html,xml,xsl,erb source ~/.vim/scripts/closetag.vim
:au Filetype c,py,rb,erb source ~/.vim/scripts/autoclose.vim
:au Filetype mail set textwidth=80
:au Filetype mail set spell
"" indent params with parens
autocmd BufNewFile,BufRead *.cc,*.cpp,*.h,*.hh,*.java set cinoptions+=(0
"" view options
syntax enable
set t_Co=256
set background=dark
set colorcolumn=80
"" include ?'s in keyworks in ruby
set iskeyword=@,48-57,_,192-255,?
"" autocomplete
set dictionary+=/usr/dict/words
set complete=.,w,b,d,u,t,i,k
set infercase
"for minibufexplorer (not installed):
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
let treeExplVertical=1
set tags=./tags,../tags,../../tags,../../../tags,../../../../tags,../../../../../tags,../../../../../../tags,../../../../../../../tags
" NERDTree isn't installed, so this map is disabled - installing NERDTree
" would make it live again.
"map <C-d> :execute 'NERDTreeToggle ' .getcwd()<CR>