From 4a69713c87c0d68c73754cf4572c6958f101b4c8 Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Fri, 6 Sep 2024 22:19:12 -0700 Subject: [PATCH] nvim: add ftplugin files --- .../share/nvim/data/site/ftplugin/PKGBUILD.vim | 12 ++++++++++++ nvim/.local/share/nvim/data/site/ftplugin/README.rst | 1 + nvim/.local/share/nvim/data/site/ftplugin/cpp.vim | 8 ++++++++ .../share/nvim/data/site/ftplugin/markdown.vim | 3 +++ nvim/.local/share/nvim/data/site/ftplugin/python.vim | 11 +++++++++++ nvim/.local/share/nvim/data/site/ftplugin/sh.vim | 3 +++ nvim/.local/share/nvim/data/site/ftplugin/spec.vim | 9 +++++++++ nvim/.local/share/nvim/data/site/ftplugin/tex.vim | 4 ++++ 8 files changed, 51 insertions(+) create mode 100644 nvim/.local/share/nvim/data/site/ftplugin/PKGBUILD.vim create mode 100644 nvim/.local/share/nvim/data/site/ftplugin/README.rst create mode 100644 nvim/.local/share/nvim/data/site/ftplugin/cpp.vim create mode 100644 nvim/.local/share/nvim/data/site/ftplugin/markdown.vim create mode 100644 nvim/.local/share/nvim/data/site/ftplugin/python.vim create mode 100644 nvim/.local/share/nvim/data/site/ftplugin/sh.vim create mode 100644 nvim/.local/share/nvim/data/site/ftplugin/spec.vim create mode 100644 nvim/.local/share/nvim/data/site/ftplugin/tex.vim diff --git a/nvim/.local/share/nvim/data/site/ftplugin/PKGBUILD.vim b/nvim/.local/share/nvim/data/site/ftplugin/PKGBUILD.vim new file mode 100644 index 0000000..e5071c7 --- /dev/null +++ b/nvim/.local/share/nvim/data/site/ftplugin/PKGBUILD.vim @@ -0,0 +1,12 @@ +" PKGBUILD-specific settings +" Update pkgsums on current file +map :! updpkgsums + +" 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 diff --git a/nvim/.local/share/nvim/data/site/ftplugin/README.rst b/nvim/.local/share/nvim/data/site/ftplugin/README.rst new file mode 100644 index 0000000..a654a6e --- /dev/null +++ b/nvim/.local/share/nvim/data/site/ftplugin/README.rst @@ -0,0 +1 @@ +See :help filename-modifiers for more info diff --git a/nvim/.local/share/nvim/data/site/ftplugin/cpp.vim b/nvim/.local/share/nvim/data/site/ftplugin/cpp.vim new file mode 100644 index 0000000..9aab1ab --- /dev/null +++ b/nvim/.local/share/nvim/data/site/ftplugin/cpp.vim @@ -0,0 +1,8 @@ +" C/CPP-specific settings + +" Auto completion bindings +""inoremap ( (A)i +""inoremap [ [A]i +""inoremap { {A}ko + +" vim: ft=vim diff --git a/nvim/.local/share/nvim/data/site/ftplugin/markdown.vim b/nvim/.local/share/nvim/data/site/ftplugin/markdown.vim new file mode 100644 index 0000000..669f46d --- /dev/null +++ b/nvim/.local/share/nvim/data/site/ftplugin/markdown.vim @@ -0,0 +1,3 @@ +" Markdown-specific settings +" Compile to pdf presentation +map :! pandoc %:p -t beamer -o %:r.pdf diff --git a/nvim/.local/share/nvim/data/site/ftplugin/python.vim b/nvim/.local/share/nvim/data/site/ftplugin/python.vim new file mode 100644 index 0000000..fa87ce5 --- /dev/null +++ b/nvim/.local/share/nvim/data/site/ftplugin/python.vim @@ -0,0 +1,11 @@ +" Python-specific settings + +" Auto completion bindings + +" Run linter +map :! flake8 % + +" Run code formatter +map :! black % + +" vim: ft=vim diff --git a/nvim/.local/share/nvim/data/site/ftplugin/sh.vim b/nvim/.local/share/nvim/data/site/ftplugin/sh.vim new file mode 100644 index 0000000..b1c628c --- /dev/null +++ b/nvim/.local/share/nvim/data/site/ftplugin/sh.vim @@ -0,0 +1,3 @@ +" sh-specific settings +" Run shellcheck +map :! shellcheck -x % diff --git a/nvim/.local/share/nvim/data/site/ftplugin/spec.vim b/nvim/.local/share/nvim/data/site/ftplugin/spec.vim new file mode 100644 index 0000000..e20255e --- /dev/null +++ b/nvim/.local/share/nvim/data/site/ftplugin/spec.vim @@ -0,0 +1,9 @@ +" spec-specific settings +" Run rpmlint on the current fine +map :! rpmlint % + +" Rename all instances of "VCS" in file +"function ChangeVCS(vcs) +" :%s/VCS/a:vcs/g +" :%s/VCS_PACKAGE/a:vcs/g +"endfunction diff --git a/nvim/.local/share/nvim/data/site/ftplugin/tex.vim b/nvim/.local/share/nvim/data/site/ftplugin/tex.vim new file mode 100644 index 0000000..5dca197 --- /dev/null +++ b/nvim/.local/share/nvim/data/site/ftplugin/tex.vim @@ -0,0 +1,4 @@ +" LaTeX specific settings + +" Compile to pdf, use texfot to filter messages +map :! texfot pdflatex -output-directory=%:p:h %