Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d73e408

Browse files
committed
Improve some of the comments in the indentation code
1 parent d69008f commit d73e408

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

‎indent/clojure.vim

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ endfunction
5656
" Wrapper around "searchpairpos" that will automatically set "s:best_match" to
5757
" the closest pair match and optimises the "stopline" value for later
5858
" searches. This results in a significant performance gain by reducing the
59-
" number of syntax lookups that need to take place.
59+
" search distance and number of syntax lookups that need to take place.
6060
function! s:CheckPair(name, start, end, SkipFn)
6161
let prevln = s:best_match[1][0]
6262
let pos = searchpairpos(a:start, '', a:end, 'bznW', a:SkipFn, prevln)
@@ -107,15 +107,6 @@ function! s:GetClojureIndent()
107107
elseif formtype ==# 'str' || formtype ==# 'reg'
108108
" Mimic multi-line string indentation behaviour in VS Code and
109109
" Emacs.
110-
"
111-
" Scenarios:
112-
" - "=" operator should NOT alter indentation within
113-
" multi-line strings.
114-
" - Changes made while in insert mode (e.g. "<CR>"), should
115-
" use standard string indent.
116-
" - All other commands from normal mode (e.g. "o" and "O")
117-
" should trigger normal string indent.
118-
119110
let m = mode()
120111
if m ==# 'i' || (m ==# 'n' && ! (v:operator ==# '=' && state() =~# 'o'))
121112
" If in insert mode, or (in normal mode and last
@@ -141,9 +132,8 @@ endfunction
141132
if exists("*searchpairpos")
142133
setlocal indentexpr=s:GetClojureIndent()
143134
else
144-
" If searchpairpos is not available, fallback to normal lisp
145-
" indenting.
146-
setlocal lisp indentexpr=
135+
" If "searchpairpos" is not available, fallback to Lisp indenting.
136+
setlocal lisp
147137
endif
148138

149139
let &cpoptions = s:save_cpo

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /