Vi Editor Cheat Sheet



This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

Vim is a widely used, open-source Unix text editor. Learning to use Vim commands is a matter of practice and experience. That is why it is handy to have a helpful reference sheet while mastering them. In this tutorial, you will find the most important Vim commands as well as a downloadable cheat sheet. An improved version of Vi is called the Vim editor. We can download Vim in Red Hat Enterprise Linux 8 (and similar distributions) by using dnf install -y vim. How do I use this editor? Using this editor is quite simple. Type vi file-name, and the editor opens. One advantage of this editor is that we can manipulate text without using a mouse. The main purpose of an editor is to create, add, or modify text for a file. Inserting or Adding Text. The following commands allow you to insert and add text. Each of these commands puts the vi editor into insert mode; thus, the key must be pressed to terminate the entry of text and to put the vi editor back into command mode. This cheat sheet is intended to be a quick reminder for the main concepts involved in using the command line program Vim (or vi) and assumes you already understand its usage. It does not cover every command in Vim, only the ones we consider to be useful for most people for the majority of their text editing.

Notes:

Editor

Vi Editor Cheat Sheet

  • <ESC> denotes the Esc key, and<CR> denotes the Enter key.
  • The expression <cmd> means that youshould enter a command, <f> means that youshould enter a filename, and <x> means that youshould enter a character or number.
  • The symbol ^ (caret) means that youshould hold down the Ctrl key while pressing theindicated letter.
Editor

Vi editor command keys:

Ex mode commands:

Options:

Vi Editor Cheat Sheet Printable

At Indiana University, for personal or departmental Linux or Unix systems support, see Get help for Linux or Unix at IU.

Learning vi or vim is not easy. But it doesn't have to be that difficult, either. It is, in any case, faster, more powerful, and more productive than editing with any other editor, so you would do very well in investing the time and effort to learn it.

Being a vi lover myself, I came up with the idea of providing a graphical cheat sheet for those learning vi or vim, and I also found out it was a very good way to structure a tutorial. Here are the results for your learning enjoyment (or your colleagues').

By the way, I recently published the definitive article explaining why vi/vim editing is so much better than regular editing. It should prove useful if you want to read it yourself, or if you want to point your skeptical friends to a description of why it makes sense, apart from being an entertaining read: Why, oh why, do those #?@! nutheads use vi?.

Graphical cheat sheet

Vi editor cheat sheet printable

This is a single page describing the full vi/vim input model, the function of all keys, and all major features. You can see it as a compressed vi/vim manual. Click on the image below to access the full-size bitmap image, or download the vector-based, scalable SVG version (zip-compressed - and be sure to view & print the SVG with the open source application Inkscape or the Adobe plug-in for Internet Explorer, Firefox breaks the layout for some reason, apart from rendering it with no anti-alias!).


Vi Editor Cheat Sheet Pdf

Graphical cheat sheet based tutorial

Vi Editor Cheat Sheet
Lesson 1 (hi)
Lesson 2 (hi)
Lesson 3 (hi)
Lesson 4 (hi)
Lesson 5 (hi)
Lesson 6 (hi)
Lesson 7 (hi)
Zip with all GIFs
Zip with all SVGs

The tutorial above is structured in 7 lessons that cover the major commands in vi/vim. They are structured so that you will learn the simplest and most useful first, and the more advanced ones afterwards. Actually, using just the commands shown in lesson 1, you can already start editing in vi/vim in a similar way to how you would on a regular editor. Lesson 2 introduces the very powerful, and vi/vim-exclusive operators, and the rest of the lessons advance from there. Each thumbnail links to a high-resolution bitmap version. You can also download the full tutorial in a single zip file with all the bitmaps or a single zip file with all the SVGs (see the note above about incorrect rendering on Firefox).

Notes

vim is an incredible editor by Bram Moolenaar, based on the original vi by Bill Joy, adding a ton of improvements over it. Nowadays, you should choose vim over vi every time you can.

Pixel gun 3d mod menu apk 2019. The cheat sheet and tutorial cover most important functions of vi's input model, leaving out the more advanced regular expressions/ex command line material. This should be a very good beginning to becoming a vi/vim wizard.

With the single exception of the external filter feature ('!'), all functions shown are supported by ViEmu, my commercial add-in that provides advanced vi-vim emulation in Visual Studio.

Cheat

Relevant links

Vi Editor Graphical Cheat Sheet

This cheat sheet has proven to be pretty popular. Here are some relevant links:

Linux Vi Editor Cheat Sheet

  • Brendan Kidwell prepared a PDF version for easy printing of the whole tutorial and cheat sheet
  • Peter Hosey prepared a Dvorak layout version
  • Donglu Feng prepared a simplified-Chinese version
  • Mark Schoonover prepared another Dvorak version (more similar to the original)
  • Nathael prepared a version with the French AZERTY keyboard layout, you can visit his page.
  • G. Richard Bellamy took the time to prepare a Kinesis-Ergo style Dvorak version in SVG (for which he prepared a new Dvorak SVG version.
  • Erkki Nousiaynen from Globe Views prepared a very nice Norwegian translation

And of course, the article detailing why vi/vim editing is 'the killerest':

Vi Commands Cheat Sheet Pdf

  • Why, oh why, do those #?@! nutheads use vi?.




Comments are closed.