Open a Vi editor
Press"I" toinsert the data
for saving a file
press
(esc):W filename.txt
Press"I" toinsert the data
for saving a file
press
(esc):W filename.txt
Move the cursor around the screen
h - Cursor left
j - Cursor down
k - Cursor up
l - Cursor right
j - Cursor down
k - Cursor up
l - Cursor right
deleting single line and single word from the Vi editor
Delete single word by moving the cursor on that word and switch the cmd to command line
i.e (esc) then press X
y | Copy current line |
Ctrl-F | Forward one screen | cw | Change word |
Ctrl-B | Back one screen | cc | Change line |
Ctrl-D | Down half a screen | C | Change from current position to end of line |
Ctrl-U | Up half a screen | dd | Delete current line |
Ctrl-E | Display another line at bottom of screen | ndd | Delete n lines |
Ctrl-Y | Display another line at top of screen |
No comments:
Post a Comment