Vim is a highly configurable text editor built to enable efficient text editing.
The vi/vim editors are used in three modes:
1.Command Mode
2.Insert Mode
3.Ex-Mode
Command Mode:
This mode is the default mode. Following things we can do in this mode.
Insert Mode:
This mode is used to insert the text into line
EX-Mode:
Press Esc (Escape) key to enter the EX-Mode
The vi/vim editors are used in three modes:
1.Command Mode
2.Insert Mode
3.Ex-Mode
Command Mode:
This mode is the default mode. Following things we can do in this mode.
| yy (Yank/copy) |
copying the single line.
|
| p | Paste a content below the cursor |
| P | Paste a content above the cursor |
| nyy |
copying the multiple lines or n numbers of lines at a time. For example, to copy 12 consecutive lines from one part of a file to another, follow these steps:
|
| dd | Delete a single line |
| ndd | Delete multiple line or n number of line at a time. |
| x | Deleting a single character |
| dw | Deleting a single word |
| . | Redo |
| u | Undo |
| j | joining the line |
| r | Replace the character |
| Arrow Key | |
| h | Left |
| j | Down |
| k | Up |
| l> | Right |
| Ctrl+d |
Scroll Down
|
| Ctrl+u | Scroll up |
Insert Mode:
This mode is used to insert the text into line
| i | Inserting the content before the cursor position |
| I | Insert the character starting of the line |
| a | Insert the character of the cursor append |
| A | Append the character from end of the line |
| O | Insert a new line above the cursor |
| o | Insert a new line below the cursor |
| s | Substitute the stream |
EX-Mode:
Press Esc (Escape) key to enter the EX-Mode
| :w | save the modification |
| :q | quit |
| :wq | save & quit |
| :w! | save forcefully |
| :q! | quit forcefully |
| :set nu | set the line number |
| :set nonu | remove line number |
| :<number> | it will goes to particular line |
| :r | reading the another file from here |
| :!<command> | command will be execute from here |
| :r!date | output(date,date & time) will save in current file |
Procure microsoft office 2019 home & business, Step up with the new range of Microsoft Office, containing the 2019 versions of your favorite productivity software. Upgraded Word, Excel, PowerPoint and OneNote come with enhanced new time-saving features and a sleek, modern look.
ReplyDelete