Re: [dev] Sandy editor

From: Rafa Garcia Gallego <rafael.garcia.gallego_AT_gmail.com>
Date: Sun, 29 May 2011 13:00:53 +0200

Thinking about a couple of issues now:

1.- The regexes used for syntax highlight relied on a GNU extension
(\< \> to mark word boundaries). We changed those to \b, which is the
POSIX equivalent, but some testing has determied this does not work in
some systems (MacOS as far as we know).

We looked at alternative regex engine implementations, but they either
suck (perl and the like) or do not implement the rather-useful \b (go,
plan9). Maybe it's time for a suckless regex library? Maybe we should
extend plan9's libregexp?

Actually, it was pancake who researched all this, so kudos to him.

2.- There is a (very) limited subset of keys we can bind to to comply
with everyone's requests: there are 33 Control chars: Control +
@A-Z[\]^_? but some are taken (^[ is ESC, ^I is TAB, ^M and/or ^J is
Enter). Because of the way terminals work, we can't bind to
Control+Shift... no wonder they used to call them dumb terminals.

I have tried to reduce the number of bindings to use, but going below
30 seems impossible if we want full keyboard control. There are a few
ways to go from here, but they mostly suck:

- Screw full keyboard control, drop things like deleting/moving
through lines, words, etc. bind the rest and end up with an
uncomfortable editor.
- Reduce our bindings as much as possible, then bind the least used
actions to the function keys, hoping they do not collide with your
software.
- Implement a very little amount of key chains (possibly one prefix
only) a-la emacs, again only for the least used actions.
- Bite the bullet and bind with Meta, trying to avoid an overlap with
other popular suckless software (read dwm, wmii).
- Go modal, though this would probably end with us writing yet another vi clone.
- Draw our text editor in an X window instead of a terminal/curses and
then bind Control+Shift; this potentially sucks the most and you
wouldn't be able to use sandy on console/ssh.

NOTE: common movement keys (arrows, home/end, repag/avpag...) are also
bound to the usual suspects; we are talking additional keybindings to
avoid leaving the default typing position here.

NOTE: in the meantime, you can use the current sandy code by tapping
on te original sucky way to use meta in the console: press ESC, then
the key within some millisecs. Go usability.

Any thoughts on either topic are more than welcome,
Rafa.
Received on Sun May 29 2011 - 13:00:53 CEST

This archive was generated by hypermail 2.2.0 : Sun May 29 2011 - 13:12:02 CEST