|
News
Prothom-Alo
EProthom-Alo
Bdnews24
Jugantor
Ittefaq
Kaler Kantho
Amadersomoy
Samakal
AmardeshOnline
Bhorerkagoj
Nayadiganta
Jaijaidin
Janakantha
Dainik Destiny
ManabZamin
Inqilab
Sangbad
AnandaBazar
Sangram
Dinkal
BBC Bengali
VOA Bangla |
|
Important vi command for text editing in Linux
First Previous <<< 1 2 3 4 >>> Next Last
Examples
vi /etc/dhakatips.txt
Edits the file dhakatips.txt
:q!
Typing the above command would exit the vi edit done with the above command.
| Arrow keys |
Move cursor |
| hjkl |
Same as arrow keys |
| itextESC |
Insert text |
| cwnewESC |
Change word to new |
| easESC |
pluralize word (end of word; append s; escape from input state) |
| x |
delete a character |
| dw |
delete a word |
| dd |
delete a line |
| 3dd |
deletes 3 lines |
| u |
undo previous change |
| ZZ |
exit vi , saving changes |
| :q!CR |
quit, discarding changes |
| /textCR |
search for text |
| ^U ^D |
scroll up or down |
| :cmdCR |
any ex or ed command |
| ESC |
end insert or incomplete command |
| DEL |
(delete or rubout) interrupts |
| :wCR |
write back changes |
| :w!CR |
forced write, if permission originally not valid |
| :qCR |
quit |
| :q!CR |
quit, discard changes |
| :e nameCR |
edit file name |
| :e!CR |
reedit, discard changes |
| :e + nameCR |
edit, starting at end |
| :e +nCR |
edit, starting at line n |
| :e #CR |
edit alternate file |
| :e! #CR |
edit alternate file, discard changes |
| :w nameCR |
write file name |
| :w! nameCR |
overwrite file name |
| :shCR |
run shell, then return |
| :!cmdCR |
run cmd, then return |
| :nCR |
edit next file in arglist |
| :n argsCR |
specify new arglist |
| ^G |
show current file and line |
| :ta tagCR |
position cursor to tag |
| F |
forward screen |
| ^B |
backward screen |
| ^D |
scroll down half screen |
| ^U |
scroll up half screen |
| nG |
go to the beginning of the specified line (end default), where n is a line number |
| /pat |
next line matching pat |
| ?pat |
previous line matching pat |
First Previous <<< 1 2 3 4 >>> Next Last
|
|
NEW POST
BANGLADESH |