Skip to content

Commit

Permalink
Additional indentation improvements:
Browse files Browse the repository at this point in the history
 - Improved indentation of comments.
 - Simplified option for unclosed parentheses.
  • Loading branch information
bak-t committed Jan 10, 2024
1 parent 7ad3d81 commit 4067ab5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions indent/ps1.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ setlocal cindent
" Disable zero indentation of lines started with "#" in insert mode, which are comments
setlocal cinkeys-=0#
" Enable detection of Shell/Perl style comments
setlocal cinoptions+=#1
setlocal cinoptions+=#1s
" Disable additonal indentation for "continuation lines", which are all the lines missing ";"
setlocal cinoptions+=+0
" Make indentation single for unclosed parentheses (multiline argument lists and array literals).
" By default it's shiftwidth * 2
execute "setlocal cinoptions+=(" . &shiftwidth
setlocal cinoptions+=(1s

let b:undo_indent = "setl cindent< cinkeys< cinoptions<"

0 comments on commit 4067ab5

Please sign in to comment.