Merge pull request #39260 from chreekat/idiomatic-vim-ft-plugin

vim: idiomatic nix filetype plugin
This commit is contained in:
Daiderd Jordan 2018-04-22 00:25:40 +02:00 committed by GitHub
commit 313b5fce7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,5 +85,12 @@ new file mode 100644
--- /dev/null
+++ b/runtime/ftplugin/nix.vim
@@ -0,0 +1,2 @@
+" Only do this when not done yet for this buffer
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+" coding conventions
+setlocal sw=2 ts=2 expandtab
+setlocal shiftwidth=2 expandtab softtabstop=2
+let b:undo_ftplugin = "setlocal sw< et< sts<"