-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.lvimrc
24 lines (24 loc) · 1003 Bytes
/
.lvimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
" Project overrides for Vim
" See: http://www.vim.org/scripts/script.php?script_id=441
" I use it with the following in my .vimrc:
" let g:localvimrc_persistent=2
" let g:localvimrc_event=["BufWinEnter","BufReadPre","BufNewFile"]
if &filetype =~ 'php'
setlocal expandtab
setlocal tabstop=4
setlocal shiftwidth=4
setlocal softtabstop=4
let &l:makeprg="phpcs --report=emacs --standard=PEAR --tab-width=4 --ignore=smarty,tpl_c -n %"
endif
if &filetype =~ 'javascript' || &filetype =~ 'json'
setlocal expandtab
setlocal tabstop=2
setlocal shiftwidth=2
setlocal softtabstop=2
let &l:makeprg=g:localvimrc_script_dir."/node_modules/.bin/eslint --format unix %"
endif
au BufRead,BufNewFile *.html set filetype=htmldjango
au BufRead,BufNewFile */templates/email/* set filetype=htmldjango
au BufRead,BufNewFile */templates/*/email/* set filetype=htmldjango
au BufRead,BufNewFile */templates/lib set filetype=htmldjango
au BufRead,BufNewFile */templates/*/lib set filetype=htmldjango