Vim Command

Posted by phjung1 on December 23, 2021

Sumulation Vim on the Page

Showing the Cursor Position in a Buffer

in row 2 we run the dw command to delete the word under the cursor. We can see how the buffer looks immediately after running this command by looking at the cotents of the buffer in the same row.

Highlgting Search Mathches

When demonstrating Vim’s search command, it’s helpful to be able to highlight any matches that occur in the buffer. In this example, searching for the string “the” causes four occurrences of the pattern to be highlighted:

Selecting Text in Visual Mode

Visual mode lets us select text in the buffer and then operate on the selection.

here. We use the it text object to select the cotents of the **** tag: