Editor In Red Hat

Editors in Red Hat :

The term editor is commonly used to refer to a text editor, which is a software program that allows users to create or manipulate plain text computer files.

types of editor in red hat

Nano : Is basic guide editor.

Vi : Visual editor

Vim : It is update version of vi (it is color-full editor.)

Command
#nano  anaconda-ks.cfg

The three modes of vi & vim :

  • Command mode
  • Insert mode
  • Ex mode

1. Command Mode :

Now you open new file by vi & vim, you are in command mode.

2. Insert mode :

There are 10 keys which takes you to the ‘insert mode.

Normal we are used “i” for go to insert mode form command mode.

You show that ---Insert modes--- at last line.

If you want go back to command mode press “esc” key.

Ex mode :

To go to ex mode press “:” key and than enter the command. (shift+: key is used)

You show that “:” at last line

You can go to ex mode from command mode.

Commands for command mode editor :

  • L : move right one character.
  • H : move left one character.
  • J : move down one line.
  • K : move up one line.

above task is also doing by “arrow key”.

arrow
  • $ : move to end of the current line.
  • 0 : move to beginning of the current line.
  • W : move to the next word.
  • {{ : move to the first line of the file.
  • }} : move to the last line of the file.
  • DD : delete current line.
  • D$ : delete from cursor to end of the line.
  • U : undo the last change.
  • Yw : copy a word.
  • Y) : copy to end sentence.
  • Y} : copy to end of paragraph.
  • Yy : copy current line.
  • Y5 : copy six line form after cursor.
  • P : paste the line.

Ex mode commands :

  • :w : save file and remains in the editor.
  • :x : save file and quit.
  • :wq : same as above.
  • :q : quit when no change made to file.
  • :q! : quit without save.
  • :wq! : Save & exit forcefully.
  • /text : searches downward for next
  • :set nu : to set number
  • :20 : to go the 20 number line.
  • :%s/windows/linux : replace the word.
Command
Cp anaconda-ks.cfg /root/Desktop/
Vim /root/Desktop/anaconda-ks.cfg (do above command)
#Editors_in_Red_Hat #Commands_for_command_mode_editor #Ex_mode_commands #The_three_modes_of_vi_&_vim #Command_Mode_in_red_hat

(New page will open, for Comment)

Not yet commented...