From the course: Learning Vim

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Move to last change

Move to last change - vi Tutorial

From the course: Learning Vim

Start my 1-month free trial

Move to last change

- [Instructor] You can define your own marks and jump to them and this is very handy. To make things even nicer, Vim defines some automatic marks for you. One of the most useful ones is the dot. The dot mark is updated to the last line where you made the last change. Say you're Mark Twain writing yet another great book. You edit the first chapter. So vim yankee one dot txt. You're up to line 47 so call on 47, enter. And you want to change it to, and you want to change I sat by my fire to I sat by my fire at the Warwick Arms. So, slash comma to get to the first comma. Insert to get to insert mode and at the, and then you forgot how you wrote Warwick. So, escape to go back to normal mode. Then we search by quotes with question mark and then war. We get Warwick. We copy it with yw and then we go back to where the last change was with single quote dot. Now we go back to the comma, forward slash, comma, enter, and shift + b to paste, a to enter insert mode and Arms and we are done. I use…

Contents