Text editors

From English Wiki
Jump to navigation Jump to search

A text editor is a simple text program that does not include any special formatting or document structure supplied by the program - just plain text. These are useful for a number of programming and operating system management purposes. Common text editors are Notepad and Wordpad in Micro$oft Windows, but such programs are more commonly used among Linux users. For full access to some system internals, for security purposes, or for various other reasons, Linux users tend to use older text editors like vi and vim, which trace back to the early days of computing before graphical user interfaces were the norm. Below are common keyboard commands and shortcuts for vi. Others will follow later.


1 vi

This is one of the older Linux editors, which can be notoriously difficult and counter-intuitive for newbies.[1]

Command Function
vi Launch the vim editor.
o Insert mode for opening a new line.
A Insert mode for writing at the end of the line.
a Insert mode that enables the system user to write their input after a cursor.
ESC Exit the insert mode.
cw Change a word.
~ Change the case (upper or lower) of individual characters.
x Delete a character at the cursor.
dd Delete a line.
dw Delete a word.
4dw Delete four words.
C Delete line content(s) that follow or succeed the cursor and additionally allows the system user to insert new text.
D Delete line content(s) that follow or succeed the cursor.
3dd Delete three lines.
R Overwrite all the characters succeeding the cursor.
:wq Quit the editor and also make changes to the open file.
:q! Quit the editor without saving the implemented changes.
r Replace a character.
S Substitute an entire line and then initiate insert mode at the beginning of that same line.
s Substitute a single character under cursor and then continues to insert mode.
i Takes the editor to insert mode and initiates a cursor.
U Undo vim command for an entire line.
u Undo vim command for the last change.


2 See also