suchnsuch / Tangent

The publicly-available modules of the Tangent project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create a "Structure Mode" for editing.

taylorhadden opened this issue · comments

The basic concept is that you can shift between a standard text-based editing mode and a block-based editing mode. Perhaps you toggle with Mod+L/Mod+Shift+L/Mod+Alt+L for "Line".

Once in this mode,

  • Arrows move selection up/down
  • Shift+Arrows add/remove selection (lines) up/down
  • Alt+Arrows shift selection up down (and any logical children, e.g. in a list, headers & contents)
  • Tab indents selection & any logical children

This could also be combined with other shortcuts for modifying list forms and other block-level constructs.

  • U – Unordered list
    • Command+*(-, +) – Unordered list, enforcing a certain character
  • O – Ordered list (numbers)
    • 1(2, 3) – Ordered list starting at number
    • A(B, C) – Ordered list with alpha-numeric starting with character
  • J - Join lines into one (when multiple lines are selected)
  • T – Todo List
  • Escape/Enter to drop you out (maybe with selection / without selection at end of line)
  • Delete to delete & stay in line mode

While I do not disagree on the usefulness, I believe that having a separate mode detracts from a fluid editing experience by creating additional steps to a goal.
One way to minimize that I would suggest is to drop the mod key entirely in favor of having simple single key sequences (not pressing keys at the same time) when not in edit mode.
For example pressing l u for unordered list and l o for ordered list, i k to insert a link, etc, in this case there are more keybind options because you can have more action associated with a given letter.

A idea is to use a menu key to open a context menu that you navigate through the mentioned keys sequences without a mouse, and removing the need for a separate mode.
That context menu can contain descriptions of commands so that it is intuitive to use and self informative.
Edit: I have noticed that I just described the command palette accidentally.