Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't indent code blocks #76

Merged
merged 1 commit into from
May 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion indent/supercollider.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
" https://github.com/supercollider/scvim
" License GPLv3
"
" this indent function isn't that smart yet, hopefully it'll improve in the future

if exists ('b:did_scvim_indent')
finish
endif
Expand All @@ -28,6 +28,11 @@ function! GetSCIndent()

let ind = indent(lnum)

" don't create indentation for code blocks
if prev_line =~# '^($'
return ind
end

if prev_line =~# '\(\/\/.*\)\@\<![[({]\s*\([^])}]*\)\=$'
let ind = ind + &shiftwidth
endif
Expand Down