/ Published in: Bash
Example on how to automatically set :make function depending on the type of the loaded file
Expand |
Embed | Plain Text
" can be made smarter (wrapped in one function + array of commands etc) " but it's just a example :-) " link make with php" function! Set_Php_Make() set errorformat=%m\ in\ %f\ on\ line\ %l" set makeprg=php\ -l\ % endfunction autocmd FileType php call Set_Php_Make() " link jslint to javascript function! Set_Js_Make() set makeprg="~/bin/jsl\ --conf\ ~/bin/jsl.default.conf\ --process\ %" endfunction autocmd FileType javascript call Set_Js_Make()
You need to login to post a comment.
