VI is a confusing, frustrating, backwards, difficult-to-learn text editor. So why even deal with it? Because VI exists on virtually every UNIX system in the world, and if you can use VI, you can edit text on almost any UNIX system. VI also works over a dial-up connection, unlike some other text editors such as vuepad. To make VI a little easier to use, I have compiled a set of VI commands into a series of cheat sheets that you can download. These cheat sheets contain very extensive explanations of VI commands, and with a little perseverance, you’ll be able to work efficiently on almost any text file. A small sample of what this download contains is shown below.
|arrow keys||These do work, but they may be too slow on big files.|
|h j k l||Left, down, up, and right respectively.|
|CTRL-d||Moves forward œ screenful.|
|CTRL-f||Moves forward one entire screenful.|
|CTRL-u||Moves backward œ screenful.|
|CTRL-b||Moves backward one entire screenful.|
|nG||Moves to line n in the file.|
|G||Moves to the end of file.|
|H||Moves to the top of the screen.|
|M||Moves to the middle of the screen.|
|L||Moves to the bottom of the screen.|
|w or W||Moves to the start of the next word in the line; W ignores punctuation.|
|b or B||Moves to the start of the previous word in the line; B ignores punctuation.|
|e or E||Moves to the end of the next word in the line; E ignores punctuation.|
|^||Moves to the first non-blank character in the current line.|
|$||Moves to the last character in the current line.|
|+ or <CR>||Moves to the first character in the next line.|
Download our UNIX VI cheat sheets
You can download our UNIX VI cheat sheets as a Microsoft Word document and Adobe PDF file, zipped with WinZip for Windows, by following this link to the WinZip file. If you are working from a UNIX machine, please follow this link to the gzip compressed Adobe Acrobat file or this link to the gzip compressed rich text file. You can also click the Downloads link in the navigation bar on the top of this page. TechRepublic has many useful documents, templates, and applications available to download, so be sure to check out all we have to offer.
If you're working on a Windows machine, you will need an unzip utility such as WinZip or PKZIP to expand the zipped file. If you are working from a UNIX machine, you will need to use gzip or gunzip to decompress the files. You will also need Microsoft Word, Adobe Acrobat Reader, or another application capable of reading rich text files to view each respective document. You can download the Adobe Acrobat Reader here.
Tell us what you think about this download. We'd like to hear your comments and suggestions, so post a comment or write to Mike Hayes.