From d73e408580669688c45b87a339f5bb50e0861437 Mon Sep 17 00:00:00 2001 From: Alex Vear Date: Thu, 27 Apr 2023 14:46:58 +0100 Subject: [PATCH] Improve some of the comments in the indentation code --- indent/clojure.vim | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/indent/clojure.vim b/indent/clojure.vim index 188a955..b84940c 100644 --- a/indent/clojure.vim +++ b/indent/clojure.vim @@ -56,7 +56,7 @@ endfunction " Wrapper around "searchpairpos" that will automatically set "s:best_match" to " the closest pair match and optimises the "stopline" value for later " searches. This results in a significant performance gain by reducing the -" number of syntax lookups that need to take place. +" search distance and number of syntax lookups that need to take place. function! s:CheckPair(name, start, end, SkipFn) let prevln = s:best_match[1][0] let pos = searchpairpos(a:start, '', a:end, 'bznW', a:SkipFn, prevln) @@ -107,15 +107,6 @@ function! s:GetClojureIndent() elseif formtype ==# 'str' || formtype ==# 'reg' " Mimic multi-line string indentation behaviour in VS Code and " Emacs. - " - " Scenarios: - " - "=" operator should NOT alter indentation within - " multi-line strings. - " - Changes made while in insert mode (e.g. ""), should - " use standard string indent. - " - All other commands from normal mode (e.g. "o" and "O") - " should trigger normal string indent. - let m = mode() if m ==# 'i' || (m ==# 'n' && ! (v:operator ==# '=' && state() =~# 'o')) " If in insert mode, or (in normal mode and last @@ -141,9 +132,8 @@ endfunction if exists("*searchpairpos") setlocal indentexpr=s:GetClojureIndent() else - " If searchpairpos is not available, fallback to normal lisp - " indenting. - setlocal lisp indentexpr= + " If "searchpairpos" is not available, fallback to Lisp indenting. + setlocal lisp endif let &cpoptions = s:save_cpo