2012-05-29 16:12:10 -04:00
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" => Python section
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
let python_highlight_all = 1
|
|
|
|
au FileType python syn keyword pythonDecorator True None False self
|
|
|
|
|
|
|
|
au BufNewFile,BufRead *.jinja set syntax=htmljinja
|
|
|
|
au BufNewFile,BufRead *.mako set ft=mako
|
|
|
|
|
|
|
|
au FileType python map <buffer> F :set foldmethod=indent<cr>
|
|
|
|
|
|
|
|
au FileType python inoremap <buffer> $r return
|
|
|
|
au FileType python inoremap <buffer> $i import
|
|
|
|
au FileType python inoremap <buffer> $p print
|
2018-02-07 09:22:29 -05:00
|
|
|
au FileType python inoremap <buffer> $f # --- <esc>a
|
2012-05-29 16:12:10 -04:00
|
|
|
au FileType python map <buffer> <leader>1 /class
|
|
|
|
au FileType python map <buffer> <leader>2 /def
|
|
|
|
au FileType python map <buffer> <leader>C ?class
|
|
|
|
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
|
|
|
|
|
2021-05-31 16:28:44 -04:00
|
|
|
au FileType javascript,typescript imap <C-t> console.log();<esc>hi
|
|
|
|
au FileType javascript,typescript imap <C-a> alert();<esc>hi
|
2012-05-29 16:12:10 -04:00
|
|
|
|
2021-05-31 16:28:44 -04:00
|
|
|
au FileType javascript,typescript inoremap <buffer> $r return
|
|
|
|
au FileType javascript,typescript inoremap <buffer> $f // --- PH<esc>FP2xi
|
2012-05-29 16:12:10 -04:00
|
|
|
|
|
|
|
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()
|
2014-09-15 22:33:45 -04:00
|
|
|
|
|
|
|
au FileType gitcommit call setpos('.', [0, 1, 1, 0])
|
2016-08-20 07:31:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" => Shell section
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
if exists('$TMUX')
|
2017-03-11 05:41:34 -05:00
|
|
|
if has('nvim')
|
|
|
|
set termguicolors
|
|
|
|
else
|
|
|
|
set term=screen-256color
|
|
|
|
endif
|
2016-08-20 07:31:52 -04:00
|
|
|
endif
|
2016-10-30 09:55:53 -04:00
|
|
|
|
|
|
|
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" => Twig section
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
autocmd BufRead *.twig set syntax=html filetype=html
|
2019-11-30 12:47:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
" => Markdown
|
|
|
|
""""""""""""""""""""""""""""""
|
|
|
|
let vim_markdown_folding_disabled = 1
|