In a long commnd without vi :
Use 'Ctrl+A 'for jump starting of the line .
Use 'Ctrl+E' for jumo ending of the line .
Motion
h | Move left |
j | Move down |
k | Move up |
l | Move right |
w | Move to next word |
W | Move to next blank delimited word |
b | Move to the beginning of the word |
B | Move to the beginning of blank delimted word |
e | Move to the end of the word |
E | Move to the end of Blank delimited word |
( | Move a sentence back |
) | Move a sentence forward |
{ | Move a paragraph back |
} | Move a paragraph forward |
0 | Move to the begining of the line |
$ | Move to the end of the line |
1G | Move to the first line of the file |
G | Move to the last line of the file |
nG | Move to nth line of the file |
:n | Move to nth line of the file |
fc | Move forward to c |
Fc | Move back to c |
H | Move to top of screen |
M | Move to middle of screen |
L | Move to botton of screen |
% | Move to associated ( ), { }, [ ] |
Deleting Text
Almost all deletion commands are performed by typing d followed by a motion. For example, dw deletes a word. A few other deletes are: |
x | Delete character to the right of cursor |
X | Delete character to the left of cursor |
D | Delete to the end of the line |
dd | Delete current line |
:d | Delete current line |
Yanking Text
Like deletion, almost all yank commands are performed by typing y followed by a motion. For example, y$ yanks to the end of the line. Two other yank commands are: |
yy | Yank the current line |
:y | Yank the current line |
Changing text
The change command is a deletion command that leaves the editor in insert mode. It is performed by typing c followed by a motion. For wxample cw changes a word. A few other change commands are: |
C | Change to the end of the line |
cc | Change the whole line |
Putting text
p | Put after the position or after the line |
P | Put before the poition or before the line |
Buffers
Named buffers may be specified before any deletion, change, yank or put command. The general prefix has the form "c where c is any lowercase character. for example, "adw deletes a word into buffer a. It may thereafter be put back into text with an appropriate "ap. |
Markers
Named markers may be set on any line in a file. Any lower case letter may be a marker name. Markers may also be used as limits for ranges. |
mc | Set marker c on this line |
`c | Go to beginning of marker c line. |
'c | Go to first non-blank character of marker c line. |
No comments:
Post a Comment