From 9bb807878c64ffde8da20aab0d817423f3531435 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 25 Nov 2018 02:24:24 +1300 Subject: 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. --- vim/after/indent/awk.vim | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 vim/after/indent/awk.vim 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 -- cgit v1.2.3