The meaning of “modal”
So, what exactly is a modal editor?
A modal editor provides different modes of operation, each suited for a particular purpose. For example, in Vim, 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 Vim 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 specialised meaning, which varies by mode
- keyboard commands can be composed, which means that Vim has fewer awkward ‘chorded’ shortcuts like “ctrl+shift+r”
- different modes can optimise the use of the keyboard so that your fingers stay near the home row