mirror of
https://github.com/amix/vimrc
synced 2025-02-28 14:12:51 +08:00
Delete JavaScript, typescript config
Signed-off-by: 201341 <1186093704@qq.com>
This commit is contained in:
parent
51db5b9267
commit
6d6215be3d
@ -18,44 +18,6 @@ au FileType python map <buffer> <leader>2 /def
|
|||||||
au FileType python map <buffer> <leader>C ?class
|
au FileType python map <buffer> <leader>C ?class
|
||||||
au FileType python map <buffer> <leader>D ?def
|
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,typescript imap <C-t> console.log();<esc>hi
|
|
||||||
au FileType javascript,typescript imap <C-a> alert();<esc>hi
|
|
||||||
|
|
||||||
au FileType javascript,typescript inoremap <buffer> $r return
|
|
||||||
au FileType javascript,typescript 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
|
|
||||||
"""""""""""""""""""""""""""""""
|
|
||||||
function! CoffeeScriptFold()
|
|
||||||
setl foldmethod=indent
|
|
||||||
setl foldlevelstart=1
|
|
||||||
endfunction
|
|
||||||
au FileType coffee call CoffeeScriptFold()
|
|
||||||
|
|
||||||
au FileType gitcommit call setpos('.', [0, 1, 1, 0])
|
|
||||||
|
|
||||||
|
|
||||||
""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""
|
||||||
" => Shell section
|
" => Shell section
|
||||||
""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""
|
||||||
|
Loading…
Reference in New Issue
Block a user