From 9b8005439ac351ded8f6286aefa2378d25d7add5 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Mon, 7 Dec 2020 19:09:32 +0100 Subject: vim: update after/ftplugin/* --- .vim/after/ftplugin/c.vim | 13 ++++++++++--- .vim/after/ftplugin/clap_input.vim | 6 ++++++ .vim/after/ftplugin/gomod.vim | 1 + .vim/after/ftplugin/mail.vim | 2 ++ .vim/after/ftplugin/python.vim | 1 + .vim/after/ftplugin/tex.vim | 23 +++++++++++++++++++++++ .vim/after/ftplugin/yaml.vim | 2 ++ 7 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 .vim/after/ftplugin/clap_input.vim create mode 100644 .vim/after/ftplugin/gomod.vim create mode 100644 .vim/after/ftplugin/yaml.vim (limited to '.vim') 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 q :call clap#handler#exit() +inoremap =clap#navigation#linewise('down') +inoremap =clap#navigation#linewise('up') +nnoremap : call clap#navigation#linewise('down') +nnoremap : call clap#navigation#linewise('up') 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 c :call vimtex#compiler#compile() +" 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 -- cgit 1.4.1