1
0
mirror of https://github.com/amix/vimrc synced 2025-07-04 23:15:01 +08:00

updated plugins and added eslint goodies

This commit is contained in:
Max Alcala
2016-02-19 10:35:36 -06:00
parent a1deb28314
commit f3143286d3
402 changed files with 14389 additions and 4024 deletions

View File

@ -22,27 +22,32 @@ au FileType python map <buffer> <leader>D ?def
""""""""""""""""""""""""""""""
" => JavaScript section
"""""""""""""""""""""""""""""""
au FileType javascript call JavaScriptFold()
au FileType javascript setl fen
au FileType javascript setl nocindent
au FileType javascript imap <c-t> $log();<esc>hi
au FileType javascript imap <c-a> alert();<esc>hi
au FileType javascript inoremap <buffer> $r return
au FileType javascript inoremap <buffer> $f //--- PH ----------------------------------------------<esc>FP2xi
function! JavaScriptFold()
setl foldmethod=syntax
setl foldlevelstart=1
syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend
function! FoldText()
return substitute(getline(v:foldstart), '{.*', '{...}', '')
endfunction
setl foldtext=FoldText()
endfunction
au BufNewFile,BufRead *.es6 set ft=javascript
au BufNewFile,BufRead *.es6 set syntax=javascript
au BufNewFile,BufRead *.ejs set ft=html
au BufNewFile,BufRead *.ejs set syntax=html
" au FileType javascript call JavaScriptFold()
"au FileType javascript setl fen
" au FileType javascript setl nocindent
"
"au FileType javascript imap <c-t> $log();<esc>hi
"au FileType javascript imap <c-a> alert();<esc>hi
"
"au FileType javascript inoremap <buffer> $r return
"au FileType javascript inoremap <buffer> $f //--- PH ----------------------------------------------<esc>FP2xi
"
"function! JavaScriptFold()
" setl foldmethod=syntax
" setl foldlevelstart=1
" syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend
"
" function! FoldText()
" return substitute(getline(v:foldstart), '{.*', '{...}', '')
" endfunction
" setl foldtext=FoldText()
"endfunction
"
""""""""""""""""""""""""""""""
" => CoffeeScript section

View File

@ -117,7 +117,16 @@ nnoremap <silent> <leader>z :Goyo<cr>
" => Syntastic (syntax checker)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:syntastic_python_checkers=['pyflakes']
let g:syntastic_javascript_checkers = ['jshint']
let g:syntastic_javascript_checkers = ['eslint']
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
" let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" Custom CoffeeScript SyntasticCheck
func! SyntasticCheckCoffeescript()