diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-11-25 02:24:24 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-11-25 02:24:46 +1300 |
commit | 9bb807878c64ffde8da20aab0d817423f3531435 (patch) | |
tree | e924a8c9ee3861fda6cc314e8281fd5d953e9874 /vim/after | |
parent | Undo shell script dialect flags from filetype.vim (diff) | |
download | dotfiles-9bb807878c64ffde8da20aab0d817423f3531435.tar.gz dotfiles-9bb807878c64ffde8da20aab0d817423f3531435.zip |
Set missing b:undo_indent instructions for AWK
Switching filetypes from "awk" to another type doesn't load the
indentation of the new type, due to the absence of this setting.
Diffstat (limited to 'vim/after')
-rw-r--r-- | vim/after/indent/awk.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vim/after/indent/awk.vim b/vim/after/indent/awk.vim new file mode 100644 index 00000000..fc848d2a --- /dev/null +++ b/vim/after/indent/awk.vim @@ -0,0 +1,7 @@ +" The stock AWK indenting is decent, but doesn't include an undo variable; +" this adds one, clearing away the sole global function too. +if !exists('b:undo_indent') + let b:undo_indent = 'unlet! b:did_indent' + let b:undo_indent = b:undo_indent . '|setlocal indentexpr< indentkeys<' + let b:undo_indent = b:undo_indent . '|delfunction! GetAwkIndent' +endif |