Virtual Space Editing
Iron Professional Mode
Iron offers several editing modes in addition to its Traditional Mode, which mimics the working style of other popular text editors. Traditional Mode is familiar and comfortable when transitioning to Iron from another editor. Iron works great for the many people who prefer working in this mode.
However, if you want to up your programming game to an even higher level, this page is for you.
In this section, we introduce you to Iron Professional Mode and Virtual Space Editing. With these two modes active, you’ll being using Iron as it is designed to be used. Iron Professional Mode combines the inherent benefits of editing in virtual space with the efficiency of simplified keybindings. No longer must you choose between using a highly efficient, but difficult to learn, hard-core classical programming tool – or using an editor with an interface that is familiar, but awkward because at its core it is designed to edit prose, not computer code.
Iron Professional Mode makes use of “sticky selections” which cancel and delete text only by specific command, not as an inconsistent byproduct of using arrow keys and inserting characters. Working in this mode experienced programmers enjoy improvements in proficiency, speed and fatigue reduction by using the mouse less, being extremely predictable, avoiding traditional slow processes of prose authoring, embracing the repetitiveness of source code, foregoing stream selections entirely and emphasizing use of block column and line selections in combination with the power Multi-Selections.
Virtual Space Editing Mode (Go ahead, color outside the lines.)
The file being edited becomes a canvas where text can be inserted anywhere much like an empty matrix or spreadsheet that extends far to the right.
Virtual Space Editing is less restrictive, offering navigational freedom and source code editing efficiency non-VSE editors can’t match. Simply move the caret where you want to work, no mad pounding of the spacebar or tab key to fill in the gap. Also, using the up and down arrows simply moves the caret vertically, no “drunken caret walk” as the caret staggers back and forth along different length lines of text as it moves up or down the screen.
Working in Virtual Space Editing Mode and manipulating text primarily through blocks (column and line selections in Iron Profession Mode) is highly efficient and much more effective than stream selections when working with source code in Traditional Mode.
When using the arrow keys in VSE mode, moving the caret to the right does not wrap (optional) at the last character on the line, but will continue to move to the right on the same line, beyond the end of the text. As the caret nears any pane border, the text will auto-scroll to keep the caret inside the user-adjustable caret box. Use the Home key to place the caret at the left edge (or first character on the line).
Iron also maintains a blank virtual line at the bottom of the file in VSE mode (it has no line number and is technically past the end-of-the-file). You can scroll down beyond the end-of-the-file and simply start typing on that line to create a new line.
Use the Modes|Virtual Space Editing menu option to turn virtual space editing mode on or off.
Iron Professional Mode: Sticky Selections
Iron Professional Mode is a significant departure from how most editors and operating systems implement the highlighting and selection of text. It may take some effort to learn, and some effort to unlearn old habits. The payoff in coding efficiency is well worth it.
Iron Professional Mode emphasizes use of column and line (block) selections that are sticky and deprecates any use of traditional stream selections. Efficiency is achieved by recognizing that source code is different than prose. Source code is ordered, repetitive, meaningfully indented, chunked vertically and horizontally.
When in Iron Professional Mode, selections are “sticky”. In other words, they do not automatically cancel when moving the caret. Nor are sticky selections automatically deleted when inserting new characters or pasting text from the clipboard.
Sticky selections are canceled only with the Escape Key ESC or when Copying to the clipboard with Ctrl+C. This will take some getting use to.
Sticky Selections are deleted only when Cutting with Ctrl+X.
Sticky Selections are initiated by pressing the Shift key and using one of the arrow keys. This changes the selection style from no selection (a bare caret) to either a column selection or a line selection.
Holding down the Shift key and moving the caret left or right changes the selection style to a column selection. Likewise, holding down the Shift key and moving the caret up or down changes the selection style to a line selection.
To extend (or shrink) a sticky selection use the arrow keys without holding down the Shift key. The selection is sticky or persistent and won’t go away until you Cut with Ctrl+X, Copy with Ctrl+C or cancel with the Escape key ESC.
Since sticky selections are persistent, this allows you to type and insert characters which will automatically extend the selection. You can also delete characters with the Delete or Backspace keys and the selection will shrink accordingly.
Transitioning from another editor or Traditional Mode to Iron Professional Mode will take some effort to remember: Do not continue to hold down the Shift key.
Sticky Selections is one of the original design drivers and impetus for the creation of Iron.
Iron Professional Mode: New Thinking
“More keyboard, less mousing around.”
In most editors (be it for source code, prose, email or texting), selecting a region of text with the keyboard for copying or cutting requires holding down the Shift key and continuing to hold the Shift key which is minorly cumbersome and fatiguing. Likewise, heavy reliance on selecting text with the mouse is extremely slow and also cumbersome and fatiguing.
Hence, more experienced programmers tend to favor keeping both hands on the keyboard — avoiding the mouse and making use of a limited number of key bindings and editing mechanics.
Iron takes this reasoning into new thinking with Sticky Selections and a greatly reduced set of primary key bindings (that make use of the tactile layout of the keyboard and keypad).
Part of this new thinking is that when manipulating selections, particularly multi-selections, there’s almost no automatic actions. You as the programmer are in assertive control as to when selections are canceled, cut, copied or deleted. Actions are very distinct in Iron Professional Mode.
This greatly reduces the variety of options and reactions to keystrokes which in turn greatly reduces fatigue, mistypes and unintended editing mistakes.
Traditional Mode is Fatiguing
Consider the varieties of action when using the Delete key in Traditional Mode. Normally, without a selection, it deletes a single character at the caret’s location. When there is a selection, the Delete key deletes selected region of text but not the character at the caret’s location.
Now consider inserting a character. Normally, the character is inserted at the caret’s location. When there’s a selection active, text is first deleted and the character is inserted — not where the caret’s location but where the anchor was located (which could be off-screen).
When editing, your brain and fingers have to decipher and predict a variety of outcomes for each of a large set of key bindings. Your brain has to take into account the selection region and style and the surprising variety of possible actions for the same set of keystrokes. This is fatigue we’re all incurring without recognizing it.
Iron Professional Mode is Simpler
Iron Professional Mode works to be consistent, distinct and simpler in its actions and key bindings.
Using the Delete key always deletes the character at the caret. That’s all it does. Inserting a character inserts a character always at the caret. There is no variety, no automatic deleting of text or canceling of selections.
Deleting a selection is its own distinct action accomplished only with Ctrl+X.
The point is, then, that your brain has to deal with far less variety thus editing, cumulative over hours, becomes much less mentally fatiguing.
Iron Professional Mode: Fewer Key Bindings
Sticky Selections are also simpler and faster making use of a few, very distinct Copy/Cut/Paste key bindings. These six bindings are all you need to know to work with selections:
Shift+Left/Right_Arrow — Change to column selection
Shift+Up/Down_Arrow — Change to line selection
ESC — Cancel a selection
Ctrl+C or Keypad_Plus — Copy
Ctrl+X or Keypad_Minus — Cut
Ctrl+V or Keypad_Insert — Paste (then down)
There’s much less opportunity to accidentally delete text or drop a selection inadvertently as there is in Traditional Mode. And you don’t have to hold the Shift key down.
Add these three key bindings and multi-selection becomes a breeze:
Ctrl+Shift+Enter — New bare caret
Ctrl+Shift+Arrow_Down — Clone a selection region and style
Ctrl+Shift+Space — Toggle the multi-selection latch
The keypad can be used for Copy, Cut and Paste. Enable the keypad bindings by setting the enable parameter to true in the iron.keymap file and compile with F7:
keymap_set keymap_iron_scrap_keypad( enable = true )
Using the large keypad buttons allows for easy, fast, heavily tactile-cued editing of text where the traditional Ctrl+C/X/V combos used for Copy/Cut/Paste are fatiguing and cramp-causing for the left hand. This is a case where sloppy keystrokes without combos can be more efficient.
Also, while using Iron Professional and Virtual Space Editing modes consider customizing the Ctrl+V so it moves vertically after pasting. This tends to be more useful with source code than moving horizontally after pasting when relying mostly on column and line selections. That is, swap the default actions of Ctrl+V and Ctrl+H. Better still, avoid these commonly used shortcuts and just use the keypad Copy/Cut/Paste bindings instead.
Some of the benefits of Sticky Selections and the Iron Professional Mode includes:
- Fewer ways to cancel selections or accidentally delete text.
- Copy/Cut/Paste uses large, tactile keys for quick & sloppy editing, no combos.
- You can start a selection and edit text, then expand or contract the selection without holding down the Shift key.
- Feathers well and complements both Multi-Selection & Virtual Space Editing mode.
- Deals with the repetitive nature of source code, while writing prose is better supported by non-sticky stream selections.
- Selections are fully supported by the Undo System.
- Text is deleted only on-demand, never when navigating the caret or inserting text.
Reduced Fatigue and Complexity
Our contention is that Iron Professional Mode, with its greatly reduced complexity, is easier to use, more efficient, much less error prone and significantly less fatiguing.
Many editors are inconsistent and quirky as to when selected text is cut, canceled or simply deleted and when it’s not.
Consider how traditional non-sticky selections are affected inconsistently by these keys and combos: Delete, Backspace, Home, Page_Down, Shift+Enter and ESC. Some will delete a selection, some cancel a selection and others ignore selections all together. That’s a lot of detail to memorize, sift and adapt to, ignore or simply to contend with at a very minute level.
It’s all quite taxing and fatiguing compared to Iron’s RISC-based, simplified, consistent sticky selections and Iron Professional Mode. Each editing action is very distinct and predictable.
Important note: Iron’s primary caret is always on-screen. This reduces the likelihood that selected text that has scrolled off the screen will be inadvertently deselected or, worse, accidentally deleted unnoticed.
Work smarter, not harder.