-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
64 lines (53 loc) · 1.79 KB
/
vimrc
File metadata and controls
64 lines (53 loc) · 1.79 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
syntax on
call pathogen#infect()
filetype plugin indent on
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
set background=dark
" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
if has("autocmd")
filetype plugin indent on
endif
""" enable automated html,xml,xsl closetag script
if has("autocmd")
au Filetype html,xml,xsl source ~/.vim/closetag.vim
au FileType html set noignorecase " as advised by closetag.vim
endif
""" make smaller indentation for html
if has("autocmd")
au FileType html set sw=2
au FileType html set ts=2
endif
if has("autocmd")
au FileType javascript set sw=2
au FileType javascript set ts=2
endif
""" CSS Has mostly the depth of one therefore keep it at 4 spaces per tab
""" This way I can still see which tag/id/class something is part of but still
""" distinguish the two
if has("autocmd")
au FileType css set sw=2
au FileType css set ts=2
endif
if has("autocmd")
au FileType vim set sw=2
au FileType vim set ts=2
endif
if has("autocmd")
au FileType haml set sw=2
au FileType haml set ts=2
endif
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set smartcase " Do smart case matching
set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make
set noexpandtab " i want tabs instead of spaces