aboutsummaryrefslogtreecommitdiffstats
path: root/src/_knife
diff options
context:
space:
mode:
authorAaron Schrab <aaron@schrab.com>2012-08-23 11:18:49 -0400
committerAaron Schrab <aaron@schrab.com>2012-08-23 11:18:49 -0400
commit3f55429b0e97ff2ba57781abd9b529ac89d186b6 (patch)
tree4f15bcb124f631f79d67b3c5a29bd644f6557677 /src/_knife
parentMerge pull request #94 from aschrab/ack (diff)
downloadzsh-completions-3f55429b0e97ff2ba57781abd9b529ac89d186b6.tar
zsh-completions-3f55429b0e97ff2ba57781abd9b529ac89d186b6.tar.gz
zsh-completions-3f55429b0e97ff2ba57781abd9b529ac89d186b6.tar.bz2
zsh-completions-3f55429b0e97ff2ba57781abd9b529ac89d186b6.tar.lz
zsh-completions-3f55429b0e97ff2ba57781abd9b529ac89d186b6.tar.xz
zsh-completions-3f55429b0e97ff2ba57781abd9b529ac89d186b6.tar.zst
zsh-completions-3f55429b0e97ff2ba57781abd9b529ac89d186b6.zip
Move modelines to end of file
Having a vim modeline or emacs local variable line somewhere in the middle of the file isn't really helpful. By default, vim will only check the first and last 5 lines of a file for a modeline (assuming the modeline option is enabled). Emacs is even more strict about the type of local variable line that was in use, it will only check the first line of the file or the second line if the first line specifies a script interpreter (which isn't the case here). Move the vim modeline to the end of the file so that it can actually be found by vim but is out of the way for editing. For emacs more work is required, convert that to the more verbose Local Variables syntax which emacs will look for starting 3000 characters from the end of the file. Also there is no zsh mode for emacs (according to zsh-users/zsh-completions#75), use the "Shell-Script" mode instead. This seems to automatically detect that the files are for zsh. I'm not an emacs user, so I haven't tested that portion much. But, this does at least improve the syntax highlighting there.
Diffstat (limited to 'src/_knife')
-rw-r--r--src/_knife11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/_knife b/src/_knife
index 989e892..993454b 100644
--- a/src/_knife
+++ b/src/_knife
@@ -14,9 +14,6 @@
# * Frank Louwers (https://github.com/franklouwers)
#
# ------------------------------------------------------------------------------
-# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
-# vim: ft=zsh sw=2 ts=2 et
-# ------------------------------------------------------------------------------
# knife has a very special syntax, some example calls are:
@@ -192,3 +189,11 @@ _cookbook_versions() {
}
_knife "$@"
+
+# Local Variables:
+# mode: Shell-Script
+# sh-indentation: 2
+# indent-tabs-mode: nil
+# sh-basic-offset: 2
+# End:
+# vim: ft=zsh sw=2 ts=2 et