* Front Page * Table of Contents * Return to Town

vim quickstart

The core concept of vim is modal editing, where you are in one of a few modes while editing text. The modes determine what happens when you press keys.

The most important mode to know is Insert Mode, which lets you type things. The default mode is Normal Mode, where you can edit the text that is already there or run commands.

When you start vim, press i. You should see -- INSERT -- at the bottom of your screen. You can now type away happily.

When it's time to save, hit escape. The escape key is used in vim to exit whatever mode you are in; thus, from insert mode, you go back to normal mode.

Now press :. In normal mode, this opens a little command line at the bottom of your screen. Type w and hit enter. You just saved your file.

To quit, make sure you are in normal mode. press :, type q, and hit enter.

If you've made an edit, you wont be able to quite using just :q, though. If you want to abandon your changes, use :, and then type q!, and then hit enter. To save changes, use :, and then type wq, and then hit enter.

For a more in depth tutorial on vim, check out this cool interactive tutorial.

Our own ~shanx has a page about vim, as does ~kirch.


last compiled: 2022-06-30 14:45:10.296228