diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2021-12-21 14:41:23 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2021-12-21 14:41:23 +0100 |
commit | 87a26c5bf169bafbee837e2323f24cfb07e35250 (patch) | |
tree | 326eb21bb10c3d3633b83263d21c85c98f92a67e /indent/hamster.vim | |
parent | 918610d427503c5c7b380eae4a954bd8cb427db5 (diff) | |
download | vim-polyglot-87a26c5bf169bafbee837e2323f24cfb07e35250.tar.gz vim-polyglot-87a26c5bf169bafbee837e2323f24cfb07e35250.zip |
Update
Diffstat (limited to 'indent/hamster.vim')
-rw-r--r-- | indent/hamster.vim | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/indent/hamster.vim b/indent/hamster.vim index 86f86bf8..0e7ced5c 100644 --- a/indent/hamster.vim +++ b/indent/hamster.vim @@ -4,9 +4,15 @@ endif " Vim indent file " Language: Hamster Script -" Version: 2.0.6.0 -" Last Change: Wed Nov 08 2006 12:02:42 PM -" Maintainer: David Fishburn <fishburn@ianywhere.com> +" Version: 2.0.6.1 +" Last Change: 2021 Oct 11 +" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com> +" Download: https://www.vim.org/scripts/script.php?script_id=1099 +" +" 2.0.6.1 (Oct 2021) +" Added b:undo_indent +" Added cpo check +" " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -18,12 +24,17 @@ setlocal indentkeys+==~if,=~else,=~endif,=~endfor,=~endwhile setlocal indentkeys+==~do,=~until,=~while,=~repeat,=~for,=~loop setlocal indentkeys+==~sub,=~endsub +let b:undo_indent = "setl indentkeys<" + " Define the appropriate indent function but only once setlocal indentexpr=HamGetFreeIndent() if exists("*HamGetFreeIndent") finish endif +let s:keepcpo = &cpo +set cpo&vim + function HamGetIndent(lnum) let ind = indent(a:lnum) let prevline=getline(a:lnum) @@ -56,4 +67,8 @@ function HamGetFreeIndent() return ind endfunction +" Restore: +let &cpo = s:keepcpo +unlet s:keepcpo + " vim:sw=2 tw=80 |