How Edit File Using Three Editors In Linux Redhat




Edit File Using Three Editor Of Linux Redhat

In This Post You'll Learn Edit Files by 3 Editors. Linux have 4 Editors with Different User Interface. You can Edit file Using there Editors.


We Have 3 Editors.
  • Vi - Editor
  • Vim -Editor
  • gedit -Editor 

Vi Editor.


One edits a file in vi by issuing the command: vi file-to-edit.txt
The vi editor has three modes, command mode, insert mode and command line mode.
  1. Command mode: letters or sequence of letters interactively command vi. Commands are case sensitive. The ESC key can end a command.
  2. Insert mode: Text is inserted. The ESC key ends insert mode and returns you to command mode. One can enter insert mode with the "i" (insert), "a" (insert after), "A" (insert at end of line), "o" (open new line after current line) or "O" (Open line above current line) commands.
  3. Command line mode: One enters this mode by typing ":" which puts the command line entry at the foot of the screen.
Partial list of interactive commands:
KeywordAction
iInsert at cursor. Puts you in insert mode. Must use esc key to terminate insert mode.
IInsert before the cursor. Puts you in insert mode. Must use esc key to terminate insert mode.
aAppend after cursor. Puts you in insert mode. Must use esc key to terminate insert mode.
AAppend at end of line. Puts you in insert mode. Must use esc key to terminate insert mode.
oOpen a new line below the current cursor position. Also puts you in insert mode. Must use esc key to terminate insert mode.
OOpen a new line above the current line. Also puts you in insert mode. Must use esc key to terminate insert mode.
ESCTerminate insert mode. Terminates most other modes as well.
uUndo last change
UUndo all changes to entire line
dd
3dd
Delete line (stored in local buffer)
Delete 3 lines (stored in local buffer).
DDelete contents of line after cursor
CDelete contents of line after cursor and insert new text. Press esc key to end insertion.
dw
4dw
d)
d$
d-
dfx
d'x
'ad'b
d/cat
Delete word
Delete 4 words
Delete to end of sentence
Delete all characters from cursor to end of line
Delete current and previous line
Delete from cursor to first occurance of the letter "x"
Delete from the current line to the line marked with the identifier "x"
Delete from the line of mark "a" to the line marked "b".
Delete all characters from the cursor to the next occurance of (but not including) "cat"
cw
c)
c$
Change word
Change sentence
Change from cursor to end of line
(See "d" delete above for other variations)
xDelete character at cursor
XDelete character before cursor
Y
or
yy
Yank (copy) current line into "unnamed" storage buffer.
pPaste unnamed storage buffer after current line.
PPaste unnamed storage buffer before current line.
rReplace character
ROverwrite characters from cursor onward
sSubstitute one character under cursor continue to insert
SSubstitute entire line and begin to insert at beginning of line
JJoin current and following line into one line
~Change case of individual character
ctrl-a
ctrl-x
Increment number under the cursor.
Decrement number under the cursor.
.repeat last command action.
Control Characters: Note that to enter control characters while in insert mode, prefix the the control character with "ctrl-v" and then type the control character (ex. Carriage control: ctrl-M, Form feed: ctrl-L, Backspace: ctrl-H, Delete: ctrl-P, ...). Each control character must first be proceeded by ctrl-v while in insert mode.

Vim Editor

This "vi" tutorial is intended for those who wish to master and advance their skills beyond the basic features of the basic editor. It covers buffers, "vi" command line instructions, interfacing with UNIX commands, and ctags. The vim editor is an enhanced version of vi. The improvements are clearly noticed in the handling of tags.
The advantage of learning vi and learning it well is that one will find vi on all Unix based systems and it does not consume an inordinate amount of system resources. Vi works great over slow network ppp modem connections and on systems of limited resources. One can completely utilize vi without departing a single finger from the keyboard.

KeywordAction
iInsert at cursor. Puts you in insert mode. Must use esc key to terminate insert mode.
IInsert before the cursor. Puts you in insert mode. Must use esc key to terminate insert mode.
aAppend after cursor. Puts you in insert mode. Must use esc key to terminate insert mode.
AAppend at end of line. Puts you in insert mode. Must use esc key to terminate insert mode.
oOpen a new line below the current cursor position. Also puts you in insert mode. Must use esc key to terminate insert mode.
OOpen a new line above the current line. Also puts you in insert mode. Must use esc key to terminate insert mode.
ESCTerminate insert mode. Terminates most other modes as well.
uUndo last change
UUndo all changes to entire line
dd
3dd
Delete line (stored in local buffer)
Delete 3 lines (stored in local buffer).
DDelete contents of line after cursor
CDelete contents of line after cursor and insert new text. Press esc key to end insertion.
dw
4dw
d)
d$
d-
dfx
d'x
'ad'b
d/cat
Delete word
Delete 4 words
Delete to end of sentence
Delete all characters from cursor to end of line
Delete current and previous line
Delete from cursor to first occurance of the letter "x"
Delete from the current line to the line marked with the identifier "x"
Delete from the line of mark "a" to the line marked "b".
Delete all characters from the cursor to the next occurance of (but not including) "cat"
cw
c)
c$
Change word
Change sentence
Change from cursor to end of line
(See "d" delete above for other variations)
xDelete character at cursor
XDelete character before cursor
Y
or
yy
Yank (copy) current line into "unnamed" storage buffer.
pPaste unnamed storage buffer after current line.
PPaste unnamed storage buffer before current line.
rReplace character
ROverwrite characters from cursor onward
sSubstitute one character under cursor continue to insert
SSubstitute entire line and begin to insert at beginning of line
JJoin current and following line into one line
~Change case of individual character
ctrl-a
ctrl-x
Increment number under the cursor.
Decrement number under the cursor.
.repeat last command action.

Gedit Editor

: This is one of the cutest text editor in the Linux world. It is fairly small in size, but has fairly decent text and code editing capabilities. Although it is part of the GNOME desktop enironment you can use it on most any systems, including Windows and OS X. It is a full screen, graphical text editor. It is not as powerful as vi, but, for writing small pieces of code, this is not a bad choice. In fact, I always install it on all of my systems and use it for writing small pieces of code.


Easily Editable Like Windows Note Pad.

How To Use There Command Watch Full This Videos.








No comments

Powered by Blogger.