Next Previous Contents


Some general remarks

An editor is a programs that allows you to change (edit) the contents of a file (it will create the file if it does not exist). There are many different editors in Linux, and this document is not a detailed explanation of them, and it does not try to cover all possible editors. What editor you choose is that, a personal choice. I suggest you try several, and finally decide whichever gives you freedom to do what you need, without being so complicated that you spend more time finding commands than editing your file!


This is a powerful editor, especially when called in an X-windows session, that allows you not only to edit files but also to process TeX files, view them, printing, reading email, etc. Here are some basic commands (strokes like Ctrl-x means pressing the "Control" key, marked as Ctrl in the keyboard, and the key x at the same time):


This is a basic editor that comes bundled with the pine mail utility. Here are some of the commands used in pico (Ctrl-key stand for pressing the "Control" key and "key" together).

Key stroke                Command
Ctrl-o                    save file
Ctrl-r                    load (read) a file
Ctrl-v                    move down one screen
Ctrl-y                    move up one screen
Ctrl-w                    search
Ctrl-k                    delete
Ctrl-u                    uncut text (paste previously cut text)
Crtl-c                    information about current position in file
Ctrl-^                    mark
Ctrl-x                    exit (it will ask for saving the file)
Ctrl-j                    justify
Ctrl-g                    help


vi is a classical UN*X editor (that comes from the most basic editor ed), that many people find difficult to learn. In vi there are two modes, the inser mode, where you type whatever text you want to put in the file, and the command mode, where you give commands for the editor, like saving, moving, deleting and pasting. There are some of the commands:

Key stroke                Command
:w file-name              save the text in file-name
:w                        save the text (you have to start vi with a
                          name of a file)
:e file-name              edit file-name
:r file-name              insert contents of file-name
i                         insert text at current position
a                         append text (one position ahead of current
j                         move down one line
Ctrl-f                    move done one screen
Ctrl-d                    move down half screen
l                         move forward one character
k                         move up one line
Crtl-b                    move up one screen
Crtl-u                    move up half screen
h                         move backward one character
w                         move forward one word
b                         move backward one word
0                         go beginning of line
$                         go end of line
L                         go bottom of screen
H                         go top of screen
x                         delete one character
dw                        delete one work
dd                        delete one line
yy                        copy a line into buffer
p                         paste buffer

Next Previous Contents