What Editors Are Available?

SmoothWall GPL comes with vi, joe and jpico text editors. It is up to you as to which editor you choose to use. vi is probably the most complex of the three, and also the most powerful, however for the simple editing you are going to be doing you may not want to use vi. joe and jpico are quite straightforward to use. The choice between these two will probably come down to how you wish to save and exit.


Basic vi Usage

At the shell prompt, the following command will load the file into vi
Open a file: vi /path/to/filename

The following commands must be run in "command mode"
Navigate through the file: cursor keys
Insert characters at the current cursor position: i
Insert characters at the end of the current line: A
Delete character at the current cursor position: x
Delete the current line: dd
Write changes to file: :w
Exit if no changes have been made: :q
Exit and save all changes: :wq
Exit without saving: :q!

The following commands must be run in "edit mode"
Search for a string: / string [Enter]
Continue search: \ [Enter]
Exit insert mode and return to command mode: Esc


Basic joe Usage

At the shell prompt, the following command will load the file into joe
Open a file: joe /path/to/filename

The following commands can be used in joe
Navigate through the file: cursor keys
Insert characters at the current cursor position: type
Delete character at the current cursor position: [Del]
Delete the current line: [Ctrl]y
Search for a string: [Ctrl]kf
Continue search: [Ctrl]l
Help: [Ctrl]kh
Write changes to file: [Ctrl]kd
Exit if no changes have been made: [Ctrl]c
Exit and save all changes: [Ctrl]kx
Exit and prompt for save: [Ctrl]kq


Modification of the default configuration
Edit the following file to change the configuration defaults for joe /usr/lib/joe/joerc


Basic jpico Usage

At the shell prompt, the following command will load the file into jpico
Open a file: jpico /path/to/filename

The following commands can be used in jpico
Navigate through the file: cursor keys
Insert characters at the current cursor position: type
Delete character at the current cursor position: [Del]
Delete the current line: [Ctrl]k
Help: [Ctrl]g
Write changes to file: [Ctrl]o
Exit and save all changes: [Ctrl]x
Exit without saving: [Ctrl]c

Modification of the default configuration
Edit the following file to change the configuration defaults for jpico /usr/lib/joe/jpicorc


Additional joe and jpico Information

Modification of the default configuration
I normally choose not to show the help window by default, and I also choose not to save backups as well as disabling wordwrap. There is a clear description in the configuration file for each editor that shows you what needs to be changed to enable/disable default settings. Configure the editor so that you are comfortable with it.


This page was last modified on 10 March, 2007.