Supported editors

QNX SDP8.0User's GuideUser

The QNX OS includes and supports these editors:

vi (or elvis)
A powerful, but somewhat cryptic text-based editor that you'll find in most—if not all—Unix-style operating systems. It's actually the Visual Interface to an editor called ex.
On QNX OS, vi is a symbolic link to elvis. To start vi, type:
vi filename

The vi editor has two modes:

Command mode
The keyboard is mapped to a set of command shortcuts used to navigate and edit text; vi commands consist of one or more letters, but ex commands start with a colon (:).
Insert mode
Lets you type normally.

To switch to command mode, press Esc; to switch to input mode, press one of:

  • I or i to insert at the beginning of the current line or before the cursor
  • A or a to append text at the end of the current line or after the cursor
  • O or o to open a new line above or below the cursor
The two modes can make vi very confusing for a new user; by default, vi doesn't tell you which mode you're in. If you type this when you're in command mode:
:set showmode

the editor indicates the current mode, in the lower right corner of the display. If you always want this option set, you can add this command—without the colon—to the profile for vi, $HOME/.exrc.

Here are some of the vi commands that you'll use a lot:

To: Press:
Leave vi without saving any changes :q!
Save the current file :w
Save the current file, and then exit :wq, :x, or ZZ
Move the cursor to the left h (see below)
Move the cursor to the right l (see below)
Move the cursor up one line k (see below)
Move the cursor down one line j (see below)
Move to the beginning of the next word w
Move to the end of the current or next word (depending on the cursor position) e
Move to the beginning of the current or previous word (depending on the cursor position) b
Page back CtrlB
Page forward CtrlF
Yank (copy) the current line yy
Yank from the cursor to the end of the current word yw
Delete from the cursor to the end of the current word dw
Delete the current line dd
Paste text before the cursor P
Paste text after the cursor p
Note:
In some implementations of vi—including QNX OS's—you can also use the arrow keys to move the cursor, whether you're in command or input mode.

You can combine the commands to make them even more useful; for example, type a number before dd to delete several lines at once. In addition, vi has 26 named buffers that let you easily cut or copy and paste different blocks of text.

You can find numerous resources, tutorials, and command summaries online. In QNX OS, vi is actually a link to elvis; see the Utilities Reference.

Integrated Development Environment (IDE) editors
On Linux and Windows, the Integrated Development Environment (IDE) incorporates various specialized editors for creating C and C++ programs, buildfiles, and so on. You can use the Target File System Navigator in the IDE to edit files on your QNX OS system. For more information, see the IDE User's Guide.
Note:
The Bazaar project on our Foundry27 website (http://community.qnx.com) may include other editors (as well as other third-party software that you might find useful). Note that we don't support these editors.
Page updated: