How to use vim editor in Centos/Rhel/Fedora Linux distributions.

Pubblicato il: 20 ottobre 2018
sul canale di: linux learnings
402
8

Vi is powerfull editor in linux used to edit file.
VIM is upgraded version of vi we use currently to edit files.

#vim filename

There are 3 modes in vim editor :

1)Command Mode
2)Insert Mode
3)Exit Mode

Command Mode :-

This mode is used to run command in vim editor like copy, paste, search, delete, undo etc.
Search in Vim -
/-text- - search the text downwards in file
n - continue search in same direction
N - continue search in opposite direction
?-text- - search upwards in file
n - continue search in same direction
---
u - used to undo the last change's
---
yank(copy) | cut (delete)
-------------------------
word - yw | dw
line - yy | dd
5line - 5yy | 5dd
25line- 25yy | 25dd

put (paste)
p - used to paste the data below cursor for line oriented data
P - used to paste the data above cursor
---
Insert Mode :-
It is Used to enter or edit text and for cursor movement within file
i - insert
a - ?
o - ?
I - ?
O - ?
A - ?

Esc is used to exit from insert mode to command mode

---
Exit Mode :-
This mode is used to save and exit the file
:q - quit
:wq - write & quit
:w - write only
:q! - exit forcefully and abandon changes
:wq! - save & exit forcefully

-------End of Topic---------------


In questa pagina del sito puoi guardare il video online How to use vim editor in Centos/Rhel/Fedora Linux distributions. della durata di ore minuti seconda in buona qualità , che l'utente ha caricato linux learnings 20 ottobre 2018, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 402 volte e gli è piaciuto 8 spettatori. Buona visione!