Skip to content

Commit

Permalink
Set b:undo_indent
Browse files Browse the repository at this point in the history
Like b:undo_ftplugin in filetype plugins, b:undo_indent should be set to
to a command that will undo the effect of any configuration changes in
indent plugins.

See :help undo_indent for details.
  • Loading branch information
dkearns authored and andrewrk committed Jul 28, 2022
1 parent 1b918dc commit 3538ae9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions indent/zig.vim
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ setlocal cinkeys=0{,0},0),0],!^F,o,O

setlocal indentexpr=GetZigIndent(v:lnum)

let b:undo_indent = "setlocal cindent< cinkeys< cinoptions< indentexpr<"

function! GetZigIndent(lnum)
let curretLineNum = a:lnum
let currentLine = getline(a:lnum)
Expand Down

0 comments on commit 3538ae9

Please sign in to comment.