, , ,

Getting the vim and nano editors to soft wrap lines has been a real pain, but I found another editor that does this nicely, and I really, really like it. XWPE is very easy to use, especially for anyone familiar with the Borland developer environments from the early 90s (the first ever IDE I’ve used, in fact). There isn’t any syntax highlighting to begin with, though.

The first thing I did was modify the environment colours. With the editor open, use ‘Alt+o‘ to open the options drop-down menu, and ‘Adjust Colors‘.

To make these changes persistent, select ‘Save Options’. The configuration is written to /home/[user]/.xwpe/xwperc. Opening and saving modified files is straightforward, using ‘Alt+f‘ and selecting ‘File Manager‘/’Save‘.

Stacks and Tiles
Another very useful feature of XWPE is the ability to open multiple files and switch between them in the same session. Windows will be stacked automatically if more than one file is open (up to 35 windows, according to the man page), but you can also get this by selecting ‘Cascade‘ in the Window drop-down menu. To navigate through the stack, press the F6 key.

Alternatively the windows in the stack can be tiled by selecting ‘Tile‘ in the Window menu. Again, the user can switch between these with ‘F6‘.

The only real problem with XWPE is that it tends to screw up the terminal after exiting the program, maybe because it was developed for use with X Windows or X11. To get round this, use the ‘reset‘ command to restore the terminal session.

Syntax Highlighting
There isn’t any default syntax highlighting for programming/scipting languages that aren’t listed in the configuration files, and even after modification it seems to work only when the program is launched with the ‘wpe‘ command.
The editor looks in /home/[user]/.xwpe for a syntax definition file, and if that doesn’t exist will attempt to read from /usr/local/lib/xwpe. The actual file path on a Debian system is /usr/share/xwpe/syntax_def.

Copy this to the /home/[user]/.xwpe directory, and set the normal user account as its owner:

#cp /usr/share/xwpe/syntax_def /home/[user]/.xwpe/syntax_def
#chown [username] /home/[user]/.xwpe/syntax_def

To this I’ve appended sections for C#, JavaScript and CSS.