Vi: Difference between revisions

407 bytes added ,  4 years ago
(template added)
 
(9 intermediate revisions by the same user not shown)
Line 14:
set autoindent Automatic indentation in insert mode
set noautoindent Removes the automatic indentation feature in insert mode
seset tabstop=3 Sets the number of spaces by which the tab indents during editing
syntax on Turns on highlighting of syntax
syntax off Turns off highlighting of syntax
set shiftwidth=4 The size of the indent, measured in spaces
set list List all Special characters except for white space.
 
*The .vimrc file
The EX commands (those that you key in after typing : in the Vi editor), which you want to execute whenever you start the Vi editor, can be saved in the .vimrc file in your home directory.
 
* Pages:
Control + F Next Page
Control + B Previous Page
 
== Searching ==
 
/string Search for "string"
Enter Highlight the first keyword match
N Scroll through next keyword matches
Shift + G Go to bottom of the file
Shift + N Search from Bottom to top for keyword matches
 
= Intermediate =
Line 80 ⟶ 93:
*Going to any line
:50
 
* Show Line Numbers:
:set nu
 
*In the command mode to get the same result: