-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
30 lines (23 loc) · 813 Bytes
/
vimrc
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
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
syntax on
filetype plugin indent on
" Open NERDTree if no file opened
autocmd vimenter * if !argc() | NERDTree | endif
" Close NERDTree if last thing open
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
set tabstop=4
set shiftwidth=4
set softtabstop=4
" Make tab insert indents instead of tab at beginning of line
set smarttab
" Always use spaces instead of tab characters
set expandtab
" Allow saving of files as sudo when I forgot to start vim using sudo.
cmap w!! w !sudo tee > /dev/null %
" Turn on line numbering
set number
" Set <F2> to toggle line numbers
nnoremap <F2> :set nonumber!<CR>:set foldcolumn=0<CR>
" Set <F5> to toggle Gundo
nnoremap <F5> :GundoToggle<CR>