Editor quirks

From RISC OS

Jump to: navigation, search

Contents

Edit Bug Image:edit68x68.png

The editor bundled with all versions of RISC OS is Edit. This is quite a powerful editor in its own right, although not in the same league as StrongEd or Zap. Unfortunately it has at least one serious bug; it does not cope with large files with long lines. This is most noticeable if you load a binary file for some reason. If you scroll down towards the end of the file, you will encounter redraw glitches, and you will find that clicking with the mouse and trying to alter text will change something near where you clicked. Because of the redraw bug, precisely what was changed and where in the file was altered is nigh-impossible to see. The only workaround for this well-known problem is to switch to another editor. StrongEd and Zap both come highly recommended. Edit still works fine for smaller text files.



How to add PC-delete functionality

For most RISC OS users either StrongED or Zap is likely to be the preferred text editor. The fact that neither of them do PC-style delete by default may annoy. This is easy to fix. If you just want a simple application to add the fixes in the right places, then the following link to text editor fixes on Drobe will help. (Because Drobe does not allow hotlinking you will need to open the link and then click to download the contents.) If, on the other hand, you want to know what's involved, read on:

StrongED StrongED icon

To add this functionality to StrongED, you need to edit the default KeyList. But where is it? Neither StrongHelp nor the online manual shed any light on its whereabouts.

However, if, using StrongHelp, you open the Reference section, and then open the Syntax of ModeFile page you will see a reference to KeyList.

The KeyList you need is in the file called ModeFile located in <StrongED$Dir>.Defaults.Modes.BaseMode. NB: I recommend copying this file to Choices:!StrED_cfg.UserPrefs.Modes.BaseMode .

  1. Open this up and search for 'KeyList'. Not that one, nor the next one&helip; in fact it's the last KeyList in the file. The comment just before it is: '#--- The main keylist.'
  2. Scroll down until you see the section beginning with 'Tab'.
  3. Here you will find 'Copy' and 'Delete' and you should make the following changes:
  4. on line: 'Copy' change 'DeleteRight' to 'EndOfText'
  5. on line: 'Delete' change 'DeleteLeft' to 'DeleteRight'
  6. Save, quit StrongED and reload.

Zap Zap icon

Zap is easier, as you can find the Keymap file from the iconbar menu: Options->Edit config->Keys.

  1. This opens the file Choices:!ZapUser.Config.Keys.UK. Make the following changes to it:
  2. on line: "DELETE &07F' change 'DELETE' to 'DELETENEXT'
  3. on line: 'sDELETE &01F' change 'DELETE "NEXT"' to 'DELWORDEND'
  4. on line: 'Copy &18B' change 'DELETENEXT' to 'CRIGHT'
  5. Save, then click on Options->Create & reload keys
Personal tools