by MrVandemar · 3y ago · 0 comments
vi"
If your cursor is within two quotes on a line, it will select everything inside those quotes to (c)hange, (y)ank or (d)elete or whatever you want. Great if you're the sort of person who writes HTML by hand all the time.For more fun, activate vim-surround. E.g. to replace surrounding quotes with parentheses: cs"(
I think kakoune works like that, but I don’t have the will to learn another editor and vi is what’s available everywhere anyway
E.g.
y2a(
means yank everything inside (and including) the second nested pair of parentheses out from the current point.I wish vim was better at showing what you’re going to operate on, and edit it before the operation. Eg a( could select out of the first parentheses then n to extend until everything I want selected is, then y