-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
55 lines (46 loc) · 1.32 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
syntax on
set background=dark
set nocompatible
set showmatch
set guioptions-=T
set vb t_vb=
set ruler
"set virtualedit=all
set number
set linebreak
set incsearch
set hlsearch
set textwidth=100
map! <M-BS> <C-W>
" Indentation
set autoindent
set smartindent
set sw=4
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
" Stop vim from exiting with status 1.
filetype on
" Set up vim for optimal use with Drupal.
au BufNewFile,BufRead *.engine set filetype=php
au BufNewFile,BufRead *.theme set filetype=php
au BufNewFile,BufRead *.module set filetype=php
au BufNewFile,BufRead *.test set filetype=php
au BufNewFile,BufRead *.install set filetype=php
au BufNewFile,BufRead *.inc set filetype=php
au BufNewFile,BufRead *.profile set filetype=php
" Good completion.
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType inc set omnifunc=phpcomplete#CompletePHP
" Lots of history / undo.
set history=1000
set undolevels=1000
" Set the terminal title
set title
" Allow saving of files as sudo when I forgot to start vim using sudo.
cmap w!! w !sudo tee > /dev/null %