-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfiletype.vim
More file actions
43 lines (39 loc) · 1.49 KB
/
filetype.vim
File metadata and controls
43 lines (39 loc) · 1.49 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
" my filetype file
if exists("did_load_filetypes")
finish
endif
augroup filetypedetect
au!
" ipmasq rules
au! BufRead,BufNewFile *.rul setfiletype sh
au! BufRead,BufNewFile *.def setfiletype sh
" force *.h files to be detected as C and not C++
au! BufRead,BufNewFile *.h setfiletype c
" change type of *.patch files to 'git', because
" it's more sophisticated (folds changes on file basis)
au! BufRead,BufNewFile *.patch setfiletype git
" OVS include makefiles
au! BufRead,BufNewFile automake.mk setfiletype automake
" linux kernel makefiles
au! BufRead,BufNewFile Kbuild,Kbuild.sub setfiletype make
" Colibri FOP declaration files
au! BufRead,BufNewFile Makefile.ff setfiletype make
au! BufRead,BufNewFile *.ff setfiletype c
" fio config files
au! BufRead,BufNewFile *.fio setfiletype dosini
" tmux config files
au! BufRead,BufNewFile .tmux.conf*,tmux.conf* setfiletype tmux
" markdown
au! BufRead,BufNewFile *.psgi setfiletype perl
augroup END
" treat dash symbol '-' a part of a keyword for auto-completion
augroup dash_keywords
autocmd!
autocmd! FileType css,haml,html,json,sass,scss,yaml setlocal iskeyword+=-
augroup end
" set comment format without space after comment symbol
augroup comment_string
autocmd!
autocmd! FileType erb,haml,ruby,perl,python,sh,toml,yaml setlocal commentstring=#%s
autocmd! FileType javascript,sass,scss setlocal commentstring=//%s
augroup end