You actually don't need to use f to find the first opening quote. If the entire line only contains a single pair of quotes, you can simply just ci".
For searching, / is a search ahead, but the inverse is ?, to search in reverse or upward. Very useful.
The {n} and motion is not super useful unless you've relative line numbers set. Large files sometimes have hundreds and sometimes thousands of lines, and this keeps the # of lines on the page to +/- (plus or minus half your page height in lines relative to your current line). You can enable this with :set relativenumber or add it to your vimrc or init.vim (Neovim). You can always unset a command by adding a bang at the end (i.e., :set relativenumber!)
Check out The Primeagen on YouTube for some fun videos, but also the ones from Thoughtbot on YouTube. I still learning thins on a regular basis after 6 years with Vim :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice. I love Vim.
You actually don't need to use
f
to find the first opening quote. If the entire line only contains a single pair of quotes, you can simply justci"
.For searching,
/
is a search ahead, but the inverse is?
, to search in reverse or upward. Very useful.The
{n}
and motion is not super useful unless you've relative line numbers set. Large files sometimes have hundreds and sometimes thousands of lines, and this keeps the # of lines on the page to +/- (plus or minus half your page height in lines relative to your current line). You can enable this with:set relativenumber
or add it to your vimrc or init.vim (Neovim). You can always unset a command by adding a bang at the end (i.e.,:set relativenumber!
)Check out The Primeagen on YouTube for some fun videos, but also the ones from Thoughtbot on YouTube. I still learning thins on a regular basis after 6 years with Vim :)