-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_vimrc
More file actions
68 lines (55 loc) · 1.63 KB
/
_vimrc
File metadata and controls
68 lines (55 loc) · 1.63 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
" enable filetype scripts
filetype plugin on
" I want coloured code
syntax on
" ...but I use a black terminal
set background=dark
" my template files
au BufNewFile *.pl 0r ~/.vim/templates/perl.tmpl
" cfengine configs
au BufNewFile,BufRead /*var/cfengine/*/inputs/* set filetype=cfengine
" ssh_config stubs
au BufNewFile,BufRead */.ssh/*.conf setf sshconfig
" ikiwiki editing
au BufNewFile,BufRead *.mdwn set ft=ikiwiki
au BufNewFile,BufRead *.mdwn set tw=90
" preserve current indent on new lines
set autoindent
" make backspaces delete sensibly
set backspace=indent,eol,start
" indentation levels every four columns
set tabstop=4
" convert all tabs to space
set expandtab
" make the backspace key feel 'right' about tabs
set softtabstop=4
" indent/outdent by four columns
set shiftwidth=4
" indent/outdent to nearest tabstops
set shiftround
" better tab-completion behaviour
set wildmode=longest,list:longest,list:full
" no backup-files like bla~
set nobackup
set nowritebackup
" a nice looking font for gvim
set guifont=DejaVu\ Sans\ Mono\ 9
" hack for pretty manpages
autocmd FileType man setlocal ro nonumber nolist fdm=indent fdn=2 sw=4 foldlevel=2 | nmap q :quit
" Convenient command to see the difference between the current buffer and the
" file it was loaded from, thus the changes you made.
" Only define it when not defined already.
if !exists(":DiffOrig")
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
\ | wincmd p | diffthis
endif
" enable modelines for non-root
if $USER != 'root'
set modeline
else
set nomodeline
endif
set exrc " for vroom
" netrw stuff
"let g:netrw_browse_split=2
let g:netrw_altv=1