Esc | h | left |
Esc | j | down |
Esc | k | up |
Esc | l | right |
Esc | x | delete character from left to right |
Esc | X | delete character from right to left |
Esc | u | undo |
Esc | ZZ | exit |
Esc | I | insert and cursor move to first line |
Esc | o | to add a new line |
Esc | O | to add a new line above the cursor |
Esc | dd | to delete the line |
Esc | ctrl+j | cursor will move to starting cursor place |
Esc | w | forward word by word |
Esc | b | backwar word by word |
Esc | $ | move the cursor to end or line |
Esc | 9$ | move the cursor to end of 9th line from the cursor |
Esc | ^ | moves to first nonblank character for line |
Esc | fh | f=forwar search, h=searching word in one line |
Esc | Fh | F=backward search, h=searching word in one line |
Esc | 1G | to go to first line of the file |
Esc | G | to go to last line of the file |
Esc | :set number | to view the line numbers |
Esc | :set nonumber | to close the line numbers |
Esc | ctrl+G | to know the cursor current row & column number |
Esc | ctrl+U | view the screen Up side |
Esc | ctrl+D | view the screen down side |
Esc | dw | deleting word by word |
Esc | . | use to paste the laste edited word |
Esc | J | to join the 2 line to first line (for join the all lines) |
Esc | rh | replace the char to another char. r=replace, h=replacing char |
Esc | ~ | change the lower case to upper case and vice versa |
Macro | ||
qa | Start recording a macro in register a. | |
^ | Move to the beginning of the line. | |
i#include “<Esc> | Insert the string #include " at the beginning of the line | |
$ | Move to the end of the line | |
a”<Esc> | Append the character
double quotation mark (“) to the end of the line |
|
j | Go to the next line. | |
q | Stop recording the macro. | |
@a | macro placing | |
Esc | :/mansoor | to search a word mansoor |
Esc | / | to search the last search word, up, down use for search history |
Esc | :/\# | to search a speacial char # (for all special characert) |
Esc | :set hlsearch | highlight the search word on |
Esc | :set nohlsearch | highlight the search word off |
Esc | :nohlsearch | to clear the current highlight search word |
Esc | :set incsearch | incremental search |
Esc | :set noincsearch | No incremental search |
Esc | :?word | reverse search |
Esc | :/^The | search The word first word of sentence |
Esc | :/the.$ | search The word last word of sentence |
Esc | :/^$ | first blank line |
Esc | :/se.rch | matching the word |
Esc | :/%s/orig/change | search and replace |
Friday, 10 August 2012
Vim Editor
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment