The meaning of “modal”
In lesson 1 we called Helix a modal editor. So what exactly does that mean?
A modal editor provides different modes of operation, each suited for a particular purpose. In Helix, there are modes for entering keyboard commands, inserting text, and selecting text.
This is different from non-modal (or modeless) editors, which only provide one mode for inputting characters.
Click on the editor and try typing your name. It probably doesn’t do what you expect. That’s because Helix starts in normal mode, which is used for inputting editing commands, not insert mode, which is what we use to insert text.
This is unlike what we’re used to, but it does actually make sense.
With modal editors:
- every key on the keyboard can have a specialized meaning, which varies by mode
- keyboard commands can be composed, which means that Helix has fewer awkward ‘chorded’ shortcuts like “ctrl+shift+r”
- different modes can optimize the use of the keyboard so that your fingers stay near the home row