On Vim Motions

C.A. Exline
5 min readJul 21, 2023

Moving around documents is one of the most interesting and excellent features of Vim. Using the text editor to modify your documents — whether it’s a dot-file or a novel-in-progress — with Vim’s special way of allowing you to maneuver is one of its more endearing qualities. You can easily jump around within a file or from one file to another with its cunning system of jumps and marks. It also lets you perform actions on “text objects” like sentences or lines; so you can move the cursor forward or backward one sentence or several at a time with simple keyboard controls. Use ( and ) to move the cursor one sentence at a time, or precede them with a count to move by multiple sentences. You can also perform actions like change or yank on a sentence specific basis. For instance, cis allows you to change the current sentence; it deletes the sentence and places you in insert mode. All of this stuff makes Vim exceptionally competent when it comes to meeting your writing needs.

Vim’s basic motions alone are quite powerful. To get started with the most fundamental Vim motions, run vimtutorin your terminal. This will give you a good idea of how to go about using Vim and whether it’s the right software for your purposes.

Aside from the absolute most elementary movements, like h,j,k,l,w, b,B, f, et cetera, here are some of my most preferred ways of moving around documents with Vim:

Marks and Jumps

If you don’t use these you should probably start. Some helpful places for info on these features are…

--

--