Open In App

Editors and Its types in System Programming

Editors or text editors are software programs that enable the user to create and edit text files. In the field of programming, the term editor usually refers to source code editors that include many special features for writing and editing code. Notepad, Wordpad are some of the common editors used on Windows OS and vi, emacs, Jed, pico are the editors on UNIX OS. Features normally associated with text editors are — moving the cursor, deleting, replacing, pasting, finding, finding and replacing, saving etc. 

Types of Editors 
There are generally five types of editors as described below: 
 



  1. Line editor: In this, you can only edit one line at a time or an integral number of lines. You cannot have a free-flowing sequence of characters. It will take care of only one line. 
    Ex : Teleprinter, edlin, teco 
     
  2. Stream editors: In this type of editors, the file is treated as continuous flow or sequence of characters instead of line numbers, which means here you can type paragraphs. 
    Ex : Sed editor in UNIX
  3. Screen editors: In this type of editors, the user is able to see the cursor on the screen and can make a copy, cut, paste operation easily. It is very easy to use mouse pointer. 
    Ex : vi, emacs, Notepad
  4. Word Processor: Overcoming the limitations of screen editors, it allows one to use some format to insert images, files, videos, use font, size, style features. It majorly focuses on Natural language.
  5. Structure Editor: Structure editor focuses on programming languages. It provides features to write and edit source code. 
    Ex : Netbeans IDE, gEdit.

Some other editors

 



 

Editing Process

We all by now understand that editors are the program which is used to create, edit and modify a document. A document may include some images, files, text, equations, and diagrams as well. But we will be limited to text editors only whose main elements are character strings. 
The document editing process mainly compromises of the following four tasks : 
 

The above steps include filtering, formatting, and traveling. 

 

User Interface of editors: The user interface of editors typically means the input, output and the interaction language. The input devices are used to enter text, data into a document or to process commands. The output devices are used to display the edited form of the document and the results of the operation/commands executed. The interaction language provides the interaction with the editor. 

 

 

Editor Structure

 

The command language processor accepts commands, performs functions such as editing and viewing. It involves traveling, editing, viewing and display. Editing operations are specified by the user and display operations are specified by the editor. Traveling and viewing components are invoked by the editor or the user itself during the operations. 

Editing component is a module dealing with editing tasks. The current editing area is determined by the current editing pointer associated with the editing component. When editing command is made, the editing component calls the editing filter, generates a new editing buffer. Editing buffer contains the document to be edited at the current editor pointer location. 
In viewing a document, the start of the area to be viewed is determined by the current viewing pointer. Viewing component is a collection of modules used to see the next view. Current viewing can be made to set or reset depending upon the last operation. 
When display needs to be updated, the viewing component invokes the viewing filter, generates a new buffer and it contains the document to be viewed using the current view buffer. Then the viewing buffer is pass to the display component which produces the display by buffer mapping. The editing and viewing buffers may be identical or completely disjoint. The editing and viewing buffers can also partially overlap or can be contained one within the another. The component of the editor interacts with the document from the user on two levels: main memory and the disk files system.
 

Article Tags :