aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-04 00:59:23 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-04 00:59:23 +1300
commit43165b683c25a198f73304cca8b76cb9f1fae2ce (patch)
treea3e36d28b03a1dee47f5810a3f9d0c34db55ae6b
parent55699ddf44405c16f5ad6fbad6022aaeb4373683 (diff)
downloaddotfiles-43165b683c25a198f73304cca8b76cb9f1fae2ce.tar.gz
dotfiles-43165b683c25a198f73304cca8b76cb9f1fae2ce.zip
Add lint mapping for Vimscript
Runs `vint -s`; the -s includes stylistic suggestions.
-rw-r--r--vim/ftplugin/vim.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/vim/ftplugin/vim.vim b/vim/ftplugin/vim.vim
new file mode 100644
index 00000000..e023553e
--- /dev/null
+++ b/vim/ftplugin/vim.vim
@@ -0,0 +1,5 @@
+" Run `vint` over buffer
+" /dev/stdin is not optimal here; it's widely implemented, but not POSIX.
+" `vint` does not seem to have another way to parse standard input.
+nnoremap <buffer> <silent> <LocalLeader>l
+ \ :write !vint -s /dev/stdin<CR>