Você está na página 1de 30

EDITORS

Apex Institute of Technology- MBA


Apex Institute of Technology- CSE
EDITORS
• 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.
Apex Institute of Technology- CSE
Types of Editors

Line Editor

Stream Editor

Screen Editors

Word Processor

Structure Editor

Full Screen Editors

Multi Window Editor

Apex Institute of Technology- CSE


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

Apex Institute of Technology- CSE


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

Apex Institute of Technology- CSE


Screen Editor

• 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

Apex Institute of Technology- CSE


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.

Apex Institute of Technology- CSE


Structure Editor

• Structure editor focuses on programming


languages. It provides features to write and
edit source code.
Ex : Netbeans IDE, gEdit.

Apex Institute of Technology- CSE


Full Screen Editor
• In computers, a full-screen editor or distraction-free
editor is a text editor that occupies full display with the
purpose of sidelining the user from the OS and the
other applications.
• It helps the user to focus on writing only and do not get
distracted by the other applications and the cluttered
interface.
• Often fullscreen editors has a dark background and a
text field with a light colored text. T
• hey include customizable interfaces and feature like
word count.
Ex : Acme, Coderoom, FocusWriter

Apex Institute of Technology- CSE


Multiple Window Editor

• Multiple window editor allows you to work on more


than one file one file at a time and cut and paste text
from file into another via yanking and putting.
• The two fundamental concepts that lie behind multi-
window editors are buffer and windows.
• Buffer: Buffer holds the text to be edited. The text may
come from a file or a brand new text that you want to
write on a file. A file only has one buffer associated
with it.
• Windows: Windows provides a view to the buffer to
see what the buffer holds and edit and modify it.

Apex Institute of Technology- CSE


Multiple Window Editor

• A buffer may have multiple windows.


• Any changes made in any of the windows will
be reflected in all other windows associated
with the same buffer.
• Once the last window associated with a buffer
is closed, the file gets hidden.
• But if you have made any changes to the
buffer and not have written them into the
disk, it may not allow you to close the window.

Apex Institute of Technology- CSE


Architecture of Editors

Apex Institute of Technology- CSE


MS-DOS Editor
A DOS editor is a text editor that is included
with DOS, which manages text-based files
within a computer file system.

Apex Institute of Technology- CSE


MS-DOS Editor
• Type edit at the command prompt and the MS-DOS text editor
program will be run.
• Even though the edit program was designed for MS-DOS (a text
based environment), it does recognize the mouse (in the newer
version). You can use the mouse to select commands and to move
the cursor (which appears as an underline).
• Since the edit program was originally designed for use in the text
based user interface of MS-DOS rather than in the graphic
interface of modern computers, the window automatically resizes
to 80-characters wide. The window is locked at this size and
cannot be resized.
• If you view a file that has lines wider than 78 characters (2
characters are used for the "border"), you can scroll horizontally by
using the left/right/Home/End arrow keys. Unfortunately, there is
no horizontal scroll bar. There is a vertical scroll bar and you can
use the up/down/PgUp/PgDown arrow keys.
Apex Institute of Technology- CSE
MS-DOS Editor
The edit program has menus similar to what appear in modern
Windows programs:
• File: New, Open..., Save, Save As..., Close, Print..., Exit
• Edit: Cut, Copy, Paste, Clear
• Search: Find..., Repeat Last Find, Replace...
• View: Split Window, Size Window, Close Window
• Options: Settings..., Colors...
• Help: Commands..., About...
Commands can be selected by the mouse or by keyboard. As
with a modern Windows application, menus can be accessed
by keyboard by pressing the Alt key and the first letter of the
menu title (i.e.: Alt-F, Alt-E, Alt-S, Alt-V, Alt-O, Alt-H). Once a
menu is visible, use the arrow keys to move the highlight, and
pres Enter key to select.
Apex Institute of Technology- CSE
vi Editor
• The VI editor is the most popular and classic text editor in the
Linux family. Below, are some reasons which make it a widely
used editor –
• It is available in almost all Linux Distributions
• It works the same across different platforms and Distributions
• It is user-friendly. Hence, millions of Linux users love it and
use it for their editing needs
• Nowadays, there are advanced versions of the vi editor
available, and the most popular one is VIM which
is Vi Improved. Some of the other ones are Elvis, Nvi, Nano,
and Vile. It is wise to learn vi because it is feature-rich and
offers endless possibilities to edit a file.

Apex Institute of Technology- CSE


vi Editor

• To work on VI editor, you need to


understand its operation modes. They can be
divided into two main parts.
– Command Mode
– Insert Mode

Apex Institute of Technology- CSE


vi Editor

• Command Mode:
– The vi editor opens in this mode, and it
only understands commands
– In this mode, you can, move the cursor and cut,
copy, paste the text
– This mode also saves the changes you have made
to the file
– Commands are case sensitive. You should use the
right letter case.

Apex Institute of Technology- CSE


vi Editor

• Insert mode:
– This mode is for inserting text in the file.
– You can switch to the Insert mode from the
command mode by pressing 'i' on the keyboard
– Once you are in Insert mode, any key would be
taken as an input for the file on which you are
currently working.
– To return to the command mode and save the
changes you have made you need to press the Esc
key

Apex Institute of Technology- CSE


vi Editor

• Starting the vi editor


– To launch the VI Editor -Open the Terminal (CLI)
and type
– vi <filename_NEW> or <filename_EXISTING>
– If you specify an existing file, then the editor
would open it for you to edit. Else, you can create
a new file.

Apex Institute of Technology- CSE


vi Editor

• vi Editing commands
– You should be in the "command mode" to
execute these commands.
– VI editor is case-sensitive so make sure you type
the commands in the right letter-case.
– Make sure you press the right command
otherwise you will end up making undesirable
changes to the file.
– You can also enter the insert mode by pressing a,
A, o, as required.

Apex Institute of Technology- CSE


vi Editor (vi Editing Commands)

Apex Institute of Technology- CSE


vi Editor
• Moving within a file
– You need to be in the command mode to move
within a file. The default keys for navigation are
mentioned below else; You can also use the arrow
keys on the keyboard.

Apex Institute of Technology- CSE


vi Editor

• Saving and Closing the file


– You should be in the command mode to exit the
editor and save changes to the file.

Apex Institute of Technology- CSE


vi Editor

• Summary:
– The vi editor is the most popular and commonly used
Linux text editor
– It is usually available in all Linux Distributions.
– It works in two modes, Command and Insert
– Command mode takes the user commands, and the
Insert mode is for editing text
– You should know the commands to work on your file
easily
– Learning to use this editor can benefit you in creating
scripts and editing files.

Apex Institute of Technology- CSE


Word Processor

Apex Institute of Technology- CSE


Word Processor
• Sometimes abbreviated as WP, a word processoris
a software program capable of creating, storing, and
printing typed documents.
• Today, the word processor is one of the most frequently
used software programs on a computer, with Microsoft
Word being the most popular word processor.
• Word processors can be used to create multiple types
of files, including text files (.txt), rich text
files (.rtf), HTML files (.htm & .html), and Word files
(.doc & .docx).
• Some word processors can also be used to create XML
files(.xml).
Apex Institute of Technology- CSE
Word Processor
Features of a word processor
Unlike a basic plaintext editor, a word processor offers dozens of additional
features that can give your document or other text a more professional
appearance. Below is a listing of some of the most popular features of a
word processor.
• Note: Some more advanced text editors can perform some of these
functions.
• Text formatting - Changing the font, font size, font
color, bold, italicizing, underline, etc.
• Copying, cutting, and pasting - Once text has been entered into a
documented it can be copied or cut and pasted anywhere in the current
document or another document.
• Multimedia - Insert clip art, charts, images, pictures, and video into a
document.
• Spelling and Grammar - Checks for spelling and grammar errors in a
document.
• Adjust the layout - Capable of modifying the margins, size, and layout of a
document.
Apex Institute of Technology- CSE
Word Processor
• Find - Word processors give you the ability to quickly find any word or text
in any size of the document.
• Search and Replace - You can use the Search and Replace feature to replace
any text throughout a document.
• Indentation and lists - Set and format tabs, bullet lists, and number lists.
• Insert tables - Add tables to a document.
• Word wrap - Word processors can detect the edges of a page or container
and automatically wrap the text using word wrap.
• Header and footer - Being able to adjust and change text in
the header and footer of a document.
• Thesaurus - Look up alternatives to a word without leaving the program.
• Multiple windows - While working on a document you can have
additional windows with other documents for comparison or to move text
between documents.
• AutoCorrect - Automatically correct common errors (e.g., typing "teh" and
having it autocorrected to "the").
• Mailers and labels - Create mailers or print labels.
Apex Institute of Technology- CSE
Word Processor

• Import data - Import and format data from CSV, database,


or another source.
• Headers and footers - The headers and footers of a
document can be customized to contain page numbers,
dates, footnotes, or any text of all pages of the document
or specific pages.
• Merge - Word processors allow data from other documents
and files to be automatically merged into a new document.
For example, you can mail merge names into a letter.
• Macros - Setup macros to perform common tasks.
• Collaboration - More modern word processors can help
multiple people work on the same document at the same
time.

Apex Institute of Technology- CSE

Você também pode gostar