Vi command in Unix

Vi command in Unix
--=====================================================================

vi command:- visual Editor

Modes Of Vi:-
there are three modes

1. vi Modes :-
vi mode: in this mode, most keys on the keyboard are defined to be a specific command. As the key or key sequence is issued, that command is executed.

Ex:-
h j k l :- cursor
CTL-f :- forward screen
CTL-b :- backward screen
G :- end of file
x :- delete character
dw :- delete word
dd :- delete line
yy :- copy line in buffer
D :- delete to EOL
p :- paste/put buffer
u :- undo last command
CTL-r :- redo last undo (linux/vim)
. :- repeat last editing command
n :- find next occurrence of string
cw :- change word
# :- command - repeate command # times


2. input Modes :-  we are in Input mode if we press any key like "i - Inser", "a - For Append", "o - for open new line"

<ESC> to end input

i - insert
a - append
A - append at EOL
O - open line ( New Line )
r - replace character
R - overwrite

3. Command Modes :- first of all you have to know this command is works only with  colon ':', with colon : we can use this,
 whenever you want to save the file, exit from the file, write into the file, import any file under this file then this mode is used.

Ex:-

:q - quit
:q! - quit no save
:w - write
:wq - write and quit
/str - find str
:set all - vi settings
:r file - import file


Comments

Popular posts from this blog

E-Text Report In Fusion | Types of E-Text reports

Supplier API's

How to pass default Parameter in cursor