In the following code snippet, if I go to the first open parenthesis ( of the line beginning with (spit
(defn missing-accts
"Prints accounts found in one report but not the other."
[report-header mapped-data out-file]
(spit out-file (str "\n\n "
(count mapped-data)
" " report-header
"\n\n") :append true)
.
.
.
vim highlights the first ( and closing ) parentheses.
Is there and, if there is, what is the vim command that would yank the entire spit command?
Thanks.
Vim does have such a command, and fortunately it is very simple. Just type
y%.The reason this works is that
%is what Vim calls a movement command. It moves from one delimiter to the matching delimiter — in your case from the opening parenthesis to the closing one. Theycommand yanks a single line into Vim’s buffer if invoked asyy, but the secondyis not required. Instead, one can issue a movement like%, whereupon Vim will yank the text moved over. Thus,y%.