2004-03-12 Heikki Junes <hjunes@cc.hut.fi>
- * vim/lilypond-indent.vim: use <TAB> is indent character in
- insert-mode. add indenting rules.
+ * vim/lilypond-indent.vim: use <C-F> (default) as indent key
+ in insert-mode. add indenting rules.
2004-03-11 Jan Nieuwenhuizen <janneke@gnu.org>
let b:did_indent = 1
setlocal indentexpr=GetLilyPondIndent()
-setlocal indentkeys+==},>>,!<TAB>
+setlocal indentkeys+==},>>,!^F
" Only define the function once.
if exists("*GetLilyPondIndent")
"Find a non-blank line above the current line.
let lnum = prevnonblank(v:lnum - 1)
- "Check if a block was started: '{' or '<<' is the last non-blank character of the line.
+ "Check if a block was started: '{' or '<<' is the last non-blank character of the previous line.
if getline(lnum) =~ '^.*\({\|<<\)\s*$'
let ind = indent(lnum) + &sw
else
let ind = indent(lnum)
endif
- "Check if a block was ended: '}' or '>>' is the first non-blank character of the line.
- if getline(v:lnum) =~ '^\s*\(}\|>>\)'
+ "Check if a block was ended: '}' or '>>' is the first non-blank character of the current line.
+ elseif getline(v:lnum) =~ '^\s*\(}\|>>\)'
let ind = ind - &sw
endif