nvim: add ftplugin files

This commit is contained in:
Eric Torres 2024-09-06 22:19:12 -07:00
parent 8d0e65c40f
commit 4a69713c87
8 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,12 @@
" PKGBUILD-specific settings
" Update pkgsums on current file
map <C-c> <Esc>:! updpkgsums<CR>
" Rename all instances of "VCS" in file
"function ChangeVCS(vcs)
" :%s/VCS/a:vcs/g
" :%s/VCS_PACKAGE/a:vcs/g
"endfunction
" vim: ft=vim

View File

@ -0,0 +1 @@
See :help filename-modifiers for more info

View File

@ -0,0 +1,8 @@
" C/CPP-specific settings
" Auto completion bindings
""inoremap ( (<Esc>A)<Esc>i
""inoremap [ [<Esc>A]<Esc>i
""inoremap { {<Esc>A<CR>}<Esc>ko
" vim: ft=vim

View File

@ -0,0 +1,3 @@
" Markdown-specific settings
" Compile to pdf presentation
map <C-p> <esc>:! pandoc %:p -t beamer -o %:r.pdf<cr>

View File

@ -0,0 +1,11 @@
" Python-specific settings
" Auto completion bindings
" Run linter
map <C-p> <Esc>:! flake8 %<CR>
" Run code formatter
map <M-L> <Esc>:! black %<CR>
" vim: ft=vim

View File

@ -0,0 +1,3 @@
" sh-specific settings
" Run shellcheck
map <C-c> <Esc>:! shellcheck -x %<CR>

View File

@ -0,0 +1,9 @@
" spec-specific settings
" Run rpmlint on the current fine
map <C-p> <Esc>:! rpmlint %<CR>
" Rename all instances of "VCS" in file
"function ChangeVCS(vcs)
" :%s/VCS/a:vcs/g
" :%s/VCS_PACKAGE/a:vcs/g
"endfunction

View File

@ -0,0 +1,4 @@
" LaTeX specific settings
" Compile to pdf, use texfot to filter messages
map <C-p> <Esc>:! texfot pdflatex -output-directory=%:p:h %<CR>