Commits

Meikel Brandmeyer committed 586b8f9

Cleanup GetClojureIndent with fixed Yank

Comments (0)

Files changed (1)

vim/indent/clojure.vim

 
 	" In case after the paren is a whitespace, we search for the next word.
 	normal! l
-	let reg = getreg("l")
-	normal! "lyl
-	if getreg("l") == ' '
+	if vimclojure#util#Yank('l', '"lyl') == ' '
 		normal! w
 	endif
-	call setreg("l", reg)
 
 	" If we moved to another line, there is no word after the (. We
 	" use the ( position for indent.
 
 	" We still have to check, whether the keyword starts with a (, [ or {.
 	" In that case we use the ( position for indent.
-	let reg = getreg("l")
-	normal! "lye
-	let w = getreg("l")
-	call setreg("l", reg)
+	let w = vimclojure#util#Yank('l', '"lye')
 	if stridx('([{', w[0]) > 0
 		return paren[1]
 	endif