DEV Community

Discussion on: Getting started with weird parts of VIM

Collapse
 
wulymammoth profile image
David

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 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 :)