Skip to content

Commit 653858c

Browse files
dmitrivereshchaginbounceme
authored andcommitted
Make use of b:undo_indent variable (#542)
It's better when effect of indent script can be undone.
1 parent 2af5f55 commit 653858c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

indent/javascript.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ setlocal formatexpr=Fixedgq(v:lnum,v:count)
1919
setlocal indentkeys=0{,0},0),0],0\,*<Return>,:,!^F,o,O,e
2020
setlocal cinoptions+=j1,J1,c1
2121

22+
let b:undo_indent = 'setlocal smartindent< indentexpr< formatexpr< indentkeys< cinoptions<'
23+
2224
" Only define the function once.
2325
if exists("*GetJavascriptIndent")
2426
finish

0 commit comments

Comments
 (0)