diff options
| -rw-r--r-- | .vim/after/ftplugin/c.vim | 13 | ||||
| -rw-r--r-- | .vim/after/ftplugin/clap_input.vim | 6 | ||||
| -rw-r--r-- | .vim/after/ftplugin/gomod.vim | 1 | ||||
| -rw-r--r-- | .vim/after/ftplugin/mail.vim | 2 | ||||
| -rw-r--r-- | .vim/after/ftplugin/python.vim | 1 | ||||
| -rw-r--r-- | .vim/after/ftplugin/tex.vim | 23 | ||||
| -rw-r--r-- | .vim/after/ftplugin/yaml.vim | 2 |
7 files changed, 45 insertions, 3 deletions
diff --git a/.vim/after/ftplugin/c.vim b/.vim/after/ftplugin/c.vim index 85ff8a2..2d275a6 100644 --- a/.vim/after/ftplugin/c.vim +++ b/.vim/after/ftplugin/c.vim @@ -1,12 +1,19 @@ -setlocal cindent +" setlocal cindent -setlocal foldmethod=syntax -setlocal foldlevel=10 +" setlocal foldmethod=syntax +" setlocal foldlevel=10 + +if exists('g:loaded_nvim_treesitter') + set foldmethod=expr + set foldexpr=nvim_treesitter#foldexpr() +endif if exists('g:loaded_gutentags') let g:gutentags_enabled = 1 endif +let g:neoformat_enabled_c = [] + " toggle between header and implementation in c/cpp function! Alternate_c() let file = expand('%') diff --git a/.vim/after/ftplugin/clap_input.vim b/.vim/after/ftplugin/clap_input.vim new file mode 100644 index 0000000..6579064 --- /dev/null +++ b/.vim/after/ftplugin/clap_input.vim @@ -0,0 +1,6 @@ + +nnoremap <silent><buffer> q :<c-u>call clap#handler#exit()<CR> +inoremap <silent><buffer> <C-n> <C-R>=clap#navigation#linewise('down')<CR> +inoremap <silent><buffer> <C-p> <C-R>=clap#navigation#linewise('up')<CR> +nnoremap <silent><buffer> <C-n> :<c-u> call clap#navigation#linewise('down')<CR> +nnoremap <silent><buffer> <C-p> :<c-r> call clap#navigation#linewise('up')<CR> diff --git a/.vim/after/ftplugin/gomod.vim b/.vim/after/ftplugin/gomod.vim new file mode 100644 index 0000000..96369aa --- /dev/null +++ b/.vim/after/ftplugin/gomod.vim @@ -0,0 +1 @@ +set commentstring=//\ %s diff --git a/.vim/after/ftplugin/mail.vim b/.vim/after/ftplugin/mail.vim index eadd7e3..cdfbfc6 100644 --- a/.vim/after/ftplugin/mail.vim +++ b/.vim/after/ftplugin/mail.vim @@ -16,3 +16,5 @@ augroup END set commentstring=>\ %s set showtabline=0 + +command! DraftSave call SaveDraft() diff --git a/.vim/after/ftplugin/python.vim b/.vim/after/ftplugin/python.vim index 667d22e..abdaca6 100644 --- a/.vim/after/ftplugin/python.vim +++ b/.vim/after/ftplugin/python.vim @@ -1,3 +1,4 @@ let g:neomake_python_enabled_makers = [] let g:neoformat_enabled_python = ["yapf"] +let g:neoformat_python_maker_yapf_args = ["--style=pep8"] diff --git a/.vim/after/ftplugin/tex.vim b/.vim/after/ftplugin/tex.vim index e69de29..88d4f11 100644 --- a/.vim/after/ftplugin/tex.vim +++ b/.vim/after/ftplugin/tex.vim @@ -0,0 +1,23 @@ + +nnoremap <leader>c :call vimtex#compiler#compile()<cr> +" augroup Vimtex +" au! +" au BufWritePost * silent call vimtex#compiler#compile() +" augroup END + +" if exists('g:loaded_neomake') +" let g:neomake_tex_tectonic_maker = { +" \ 'exe': 'tectonic', +" \ 'append_file': 1, +" \ 'errorformat': +" \ '%Eerror: something bad happened inside TeX; its output follows:,'. +" \ '%C^[=]+$,'. +" \ '%C(%f,'. +" \ '%C.*,'. +" \ '%C! %m,'. +" \ '%Cl.%l %s,'. +" \ '%C^[=]+$,'. +" \ '%-Zcaused by: %s,' +" \ } +" let g:neomake_tex_enabled_makers = ['tectonic'] +" endif diff --git a/.vim/after/ftplugin/yaml.vim b/.vim/after/ftplugin/yaml.vim new file mode 100644 index 0000000..2d09076 --- /dev/null +++ b/.vim/after/ftplugin/yaml.vim @@ -0,0 +1,2 @@ +" fix indent +set et sts=2 |