Index->EditorsEditors
Overview and Goals
At the completion of this lab, you will be able to...
- create, edit, and save a file using a stand-alone editor
The following utilities are used in this lab:
emacs(1),
joe(1),
nano(1)
vi(1),
kate, kedit, kwrite
Choices, Choices
There are lots of editors available for Linux. In the EOS lab, we
have (at least) six to choose from. So how do you choose? First, you
could choose to learn all of them. However, it is more practical to
learn one editor well, than to barely know all of them.
joe and nano are probably the most user-friendly
editors. They don't require you to memorize bizarre key combinations to
do basic editing tasks. vi and emacs are UNIX
workhorses. They are extremely powerful, but can be confusing to
beginning users.
nano is probably the easiest but least powerful editor
available in the EOS lab. It provides basic text editing, and
that's about it.
joe is a fairly simple editor that can do a little more
than basic text editing. To learn more about joe, read its online
manual.
vi is an extremely powerful text editor that is available
on all UNIX systems. Although easier to use, joe and
nano may not be available everywhere. If you learn
vi, you will ensure that you can edit files on any UNIX
system.
VIM (vi Improved)
adds a large number of features to the basic vi editor,
including its graphics mode cousin
(gvim). I
recommend you to start with gvim if you want to learn vi. The menu bar
help you to quickly find command that you need.
Click here
for an introduction to vi.
Emacs is another extremely powerful text editor. In fact,
it is more than a text editor. From within emacs you can
browse the web, read email, chat with friends, as well as edit files.
To find more information on emacs, click here
. You can find a nice quick reference by clicking here.
Kate is designed for editing
computer programs. It has syntax highlighting feature.
If you want something simple, learn nano. If you want something
more standard and available on any UNIX or linux system then
consider vi.
Features that helps me significantly for writing computer programs:
- Auto indentation
- Syntax highlighting
- Show matching parentheses, curly braces, brackets (the '%' key)
- Auto comment block character insertion
Questions
Turn in your answer to the following questions:
|
Using the editor of your choice, describe how you would do each of the
following operations, a shortcut is preferred. I expect you to
learn the important shortcuts because they can be useful to save
time in editing for source code later on.
[You MUST type your answers using the editor of your choice.]
- File operation
- Open a file for editing
- Save a file after editing
- Cursor movement
- Move the cursor to the next line
- Move the cursor to the previous line
- Move the cursor left 1 position
- Move the cursor right 1 position
- Move the cursor to the beginning of the current line
- Move the cursor to the end of the current line
- Scroll down a whole page/screen
- Scroll up a whole page/screen
- Search
- A string of text forward
- A string of text backward
- Go to a particular line number
- Insert, Delete, Replace
- Insert a text at the current position
- Insert a text at the end of a line
- Insert a text at the beginning of a line
- Insert an indented line
- Delete a character at the current position
- Delete the whole line
- Replace all occurence of a string with a new string
|
Top
|