vim: idiomatic nix filetype plugin

* Never modify tabstop. This causes incompatibilities with other
  utilities that expect tabs to always be 8 spaces.
* Add standard boilerplate for system-level filetype plugins.
This commit is contained in:
Bryan Richter 2018-04-20 10:39:58 -04:00
parent 951d6a9f93
commit 94fd34a31b
No known key found for this signature in database
GPG Key ID: B202264020068BFB

View File

@ -85,5 +85,12 @@ new file mode 100644
--- /dev/null --- /dev/null
+++ b/runtime/ftplugin/nix.vim +++ b/runtime/ftplugin/nix.vim
@@ -0,0 +1,2 @@ @@ -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 +" coding conventions
+setlocal sw=2 ts=2 expandtab +setlocal shiftwidth=2 expandtab
+let b:undo_ftplugin = "setlocal sw< et<"