Your linux operating system will come with one or more editors in which you can write the html code for your web page. This tutorial offers an overview of basic commands from three editors: vi, pico.
The vi editor has two modes; you can edit the file in command mode, and you type in append mode. The editor begins in command mode - type an "i" or a "a" to switch to append mode, and hit the escape key to return to command mode. While in command mode, use the following commands to change your file:
Pico is simple to use. The command pico filename will open filename, or create filename and allow it to be edited. From there, pico is intuitive. The arrow keys move the cursor. Backspace or delete deletes the character immediately to the left of the cursor. Text is entered at the current cursor location, and behaves something like vi's insert mode; characters to the right of the cursor are shifted to the right as characters are inserted.
Pico displays in the last to lines of the terminal a short list of its commands, where a leading ^ indicates Ctrl-whatever. (Thus, ^G is Ctrl-G, for Get Help, and ^^ is Ctrl-6.)
In fact, Ctrl-^ (or Ctrl-6) is a very useful command. By pressing Ctrl-^, a mark is set at your current location, and all text between the mark and the left edge of the cursor is considered selected. Then certain other commands can be performed on the selection, especially Ctrl-K, to cut the text, which is useful not only for wholesale deletion, but also for cut and paste operations (use Ctrl-U for uncut), or text duplication (Ctrl-U can be used multiple times to paste the text cut to the present location of the cursor.)
One other useful although cryptic command is Read File (Ctrl-R), which loads a copy of a file and writes it into the current file at the current cursor location.
Pico's Get Help command is very useful, and anyone using pico is encouraged to try it. It provides concise but helpful descriptions of all picos commands.
Pico has certain advantages over vi, notably that there is only one mode, and second that pico has an advanced line-wrapping features, such that one doesn't have to hit return at the end of every line. Return to homepage