Submitted by LeftEccoForIQ on 2020/06/07 07:39
While looking into emacs as my main text editing (and possibly outlining) platform recently, I came across the controversy of modal vs. non-modal editing.

'Vim'-style editors have modal editing out of the box, i.e. you start out in 'command mode' and the regular alpha keys act like navigation and shortcut keys do in other programs, i.e. move the cursor, cut/copy/paste/delete/select, scroll, start a search etc. So hjkl, for example, are VIM's cursor keys. To actually enter text, you have to press a certain key to enter so-called 'insert mode', type what you have in mind, then toggle back to 'command mode' for navigation or other commands and so forth. Less frequent commands are accessed by tapping a 'leader key' followed by other characters, which is also considered more ergonomic than modifier down + key(s) for command.

Out of the box, Emacs, on the other hand, is always in insert mode and commands are entered via Ctrl- or Alt- shortcuts mostly. This so-called 'holy mode' is much less ergonomic, but more intuitive and thus easier to memorize for newcomers / non-Vimmers. However, there are now many popular addons for emacs that implement so-called 'evil mode' (Vim's modal way of editing described above) in emacs, the most popular of these being 'Spacemacs'. However, the jewel in the crown of the efficiency / ergo school of thought is an emacs addon called 'Xah Fley Keys' which puts the most frequently used commands on the keys on or near the touch typing home rows (which is not really the case with vanilla Vim or Spacemacs).

Why this rant? While following the quasi-religious debate about which model of editing is superior to the other, I realized that InfoQube, unlike Ecco Pro for example, actually uses a of modal approach to outlining / editing out of the box. You're either navigating around the outline and issuing commands ('command mode') or you are editing an item's text ('insert mode').

To come to the real point of this post: While IQ is modal, it doesn't make good use of the alpha keys at all while in 'command mode', i.e. when *not* inputting text while editing an item. This is what Vim, and even more so, Xah Fly Keys excel at. So I'm planning to transfer their power to InfoQube by means of an addon for IQ that will give users all the benefits of fast, ergonomic Vim-style commands without sacrificing - - - anything. Except maybe some pre-programmed muscle memory and the time it will take to get used to the new command keys.

Here are some examples of what a proposed 'IQ Fly Keys' command layout for grid navigation mode (as opposed to edit item text mode) could look like. The current default IQ shortcuts are listed in brackets, you can see it will be a good deal faster and easier after the initial learning curve:

Examples for the right hand only (left hand would have stuff like edit item, cut, copy, delete, search):

h - promote item (Alt-Left)
8 - move item up one position in the grid (Alt-Up)
i - move focus up to previous item (Up)
j - collapse tree at current node (Ctrl-Left)
k - move focus down to next item (Down)
, - move item down one position in the grid (Alt-Down)
l - expand tree at current node (Ctrl-Right)
: - demote item (Alt-Right)
 
and so on...
 
Again, these keys would work without having to press any modifiers at all.
 
If a few of you are interested, I'd approach the project more systematically and could ask for input on what others might see as the best keys to use for certain commands.
 
Cheers

Comments

I am interested in this, especially since I've started using the grid more than the doc pane for certain grids.
That's similar to one of my hardware projects-I have koolertron 44 and 48 keypads, that I control with autohotkey, and have been tweaking to help with IQ commands. It's nice for example, to have an F2 easily accessible
 

I have had limited experience with Vim, mostly bad.  Modal editing offers the possibility of typing whilst in command mode and this can be disasterous, so the first command you need to learn when using Vim is the 'undo' command.
 
I can't help thinking that making IQ more like Vim would not be an improvement.

LeftEccoForIQ

2020/06/12 08:15

In reply to by Paul_J_Miller

Keith: Thank you for your interest! I've also owned a pair of those Koolertrons to build a split keyboard with but have since sold them. Other than that, I'm still trying to somehow squeeze all my shortcut keys / hotkeys onto a regular TKL-size keyboard using methods like "SpaceFN" or "TouchCursor". I've tried using an extra keypad before, but so far it's never stuck.
 
As for implementing letter-based commands for the InfoQube grid without the need to use modifier keys, the first question might be whether to do it natively by creating a set of custom shortcuts in InfoQube and exporting / importing them to share with other users or whether there might be advantages in coming up with an Autohotkey-based solution, which might not be as accessible to others who don't want to use third-party software. I'm thinking I/we should just cook something up in IQ first with an optional optimization in the form of an AHK script later.
 
 
Paul: I understand your concerns and I'm also finding it devilish hard to get used to modal editing. However, as IQ is already modal, I don't think it will be major problem here. Let me ask you: How often have you ever accidentally typed text into an IQ item that you didn't actually want to edit? I doubt it's happend to me more than five times in thousands of hours of using IQ. Me at least, I'm pretty good at first checking whether I'm in edit mode in one IQ's grids rather than simply starting to type stuff into the grid. The one exception being, of course, when I create a blank item, e.g. by pressing Enter, after which I would normally just start typing to add text to the item rather than first explicitly entering edit mode, but this should be easy to work around by having Enter default to 'create new item and start editing it' rather than just 'create new item' (maybe the latter could be assigned to Shift-Enter in the context of this project).
 
At any rate, I doubt this little project will ever enter the IQ mainstream, let alone become the default so you needn't worry unless you decide to try out any kind of mod that may eventually be posted in this thread.