next up previous
Next: 10.4 The Edit Buffer Up: 10. Editing Previous: 10.2 Restoring Deleted Text

Subsections

10.3 Editing Text

No editor would be of much use if you couldn't change the text in your file. Ved makes it easy for you to do this. No confusing modes or states to deal with--you are always in ``edit mode''. To change text, just move the cursor to where you want your change or insert to occur and type.

If you are inserting characters into an existing line you may notice that the end of the line drops off the edge of the screen. Don't be alarmed, your text is still there! It will be displayed properly when you finish editing the line. As well, wordwrap will be updated.

You should note that there are two editing modes available. They can be changed though your Ved RC file, or though the Options-menu-mode function.:

10.3.1 Insert Mode

This is the default mode. It simply means that text will be inserted at the current position. When you are in insert mode, a ``I'' will be displayed to the left of the line number at the bottom of the display.


10.3.2 Overwrite Mode

In overwrite mode text will replace what is currently in the file. One exception is that if you are the end of a line (an EOL character) text will be inserted. You will never delete an EOL by typing over it in overwrite mode. When in overwrite mode a ``O'' will be displayed to the left of the line number at the bottom of the display.

Two other modes deserve mention at this point (again, these can be set in your RC file or with the Options-menu).

10.3.3 Indent Mode

When indent mode is enable (it is by default always enabled), new lines will always be indented to the same spacing as the previous line.


10.3.4 C Mode

When editing C source files it is quite useful to have the editor do some of the indentation chore for you.

When Cmode is enabled (it is by default always enabled), the following features come to life:

10.3.5 Backspace [ BackSpace]

The [Backspace] key will delete the character preceding the cursor. If the cursor is at the start of a line, this command will delete the last character on the previous line. If the cursor is at the start of the file, the first character in the file will be deleted.

10.3.6 Delete Character [Delete]

The [Delete] key will delete the character at the cursor.

10.3.7 Insert A Space [Insert]

The [Insert] key will insert a space at the current cursor position. The cursor will not be moved. This command is useful when you are in overwrite mode and wish to insert some characters ... insert one or more spaces with [Insert], then type your new text over the spaces.

10.3.8 Insert a Tab [Tab]

The [Tab] key inserts a horizontal tab character into the buffer. Normally tabs are not visible10.2, but the spacing of the text reflects, properly, the tab10.3.


next up previous
Next: 10.4 The Edit Buffer Up: 10. Editing Previous: 10.2 Restoring Deleted Text
2004-05-02