From 9c99918394b395c81edfd29f068e6ce830631977 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 25 Nov 2018 02:30:12 +1300 Subject: Define b:undo_indent for Perl buffers This should probably be pushed upstream. --- ISSUES.md | 2 ++ vim/after/indent/perl.vim | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 vim/after/indent/perl.vim diff --git a/ISSUES.md b/ISSUES.md index 3ead2d0d..4e70c0ed 100644 --- a/ISSUES.md +++ b/ISSUES.md @@ -26,3 +26,5 @@ Known issues depends on which shell you're using; the `sd` function isn't available when you're not using Bash. Maybe I should try to extend `help` without breaking it? +* The b:undo\_indent definition for the perl filetype can probably be pushed + upstream. diff --git a/vim/after/indent/perl.vim b/vim/after/indent/perl.vim new file mode 100644 index 00000000..6f97d979 --- /dev/null +++ b/vim/after/indent/perl.vim @@ -0,0 +1,9 @@ +" The stock Perl indenting is decent, but doesn't include an undo variable; +" this adds one +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 . '|unlet! b:indent_use_syntax' + let b:undo_indent = b:undo_indent . '|unlet! b:match_skip' + let b:undo_indent = b:undo_indent . '|unlet! b:match_words' +endif -- cgit v1.2.3