Vim is a text editor. Vim was created as an extended version of the vi editor, with many additional features designed to be helpful in editing program source code, its full name is Vi IMproved. While Vim is cross-platform, it is most popular on Unix-like operating systems.
Vim's interface is based not on menus or icons but on commands given in a text user interface. For many users, Vim may present a steep learning curve, meaning that learning is slow initially but once the user gets a grasp of the basics they progress quickly and their editing becomes more efficient.
to start vim and edit a file (new or existing)
to start vim and open a new file ( You can give the stuff you typed in a name when later you save it as a file.)
to exit vim and save your document first press ESC then
to exit, saving as a new filename again press 'ESC then
to exit without saving (force quit) press ESC then
When in vim you will notice that you cannot enter any text, this is because you are in the command mode of the editor, to enter the insert mode press 'i' or 'insert'. To return to the command mode hit 'ESC'
OK, the 'delete' key always works, as does the 'backspace'. However, vim has another deletion method through the command mode that doesn't require entering the insert mode.
1. move the cursor to the character you want to delete
2. press x , this character disappears
Suppose you want to find all the words apple in your file 1. Make sure you are in command mode
by hitting ESC
followed by ENTER to find an occurrence of apple. When you type the slash, it and the following characters will be shown on the bottom of the screen. After you press ENTER, the cursor will go to the first occurrence of apple if found, and the target will be highlighted.
3. after you got the first apple, you can keep typing
to find other apples
First make sure you're in command mode by pressing ESC.