quadratic
quadratic copied to clipboard
Vim mode
Hi! I just discovered this project and I'm wondering if there are any plans for adding native Vim bindings to Quadratic?
If you're unfamiliar with Vim, it is a modal text editor with a unique language for editing text in a very efficient keyboard driven fashion. Moving your hand back and forth between the keyboard and the mouse in order to click around on the screen to edit spreadsheets is very inefficient and I've always thought that it's a shame that there's no mainstream speadsheet program that supports Vim's editing language, because most of the ideas from this language could be applied directly to spreadsheet editing. Vim's language is so popular that it appears in some shape or form in tonnes other programs, mainly IDEs/editors, but also other services including Gmail.
"Modal editing" means that you switch between modes, which affects what the keys on your keyboard mean. Here are some ideas of how these modes could work in a spreadsheet editor:
| Mode | Key to press to enter mode | How it would work in a spreadsheet editor |
|---|---|---|
| Normal mode | Esc |
The default mode. Here for instance you can navigate left/down/up/right between cells by pressing h/j/k/l, enter other modes, etc. |
| Insert mode | i |
Editing the text inside a cell |
| Visual mode | v |
For selecting cells (like you otherwise would by holding down shift and pressing the arrow keys) |
Here's an image that illustrates some of the most common Vim key bindings/commands.
The closest thing I've found is the ExcelLikeVim Microsoft Excel addin, but it has a lot of limitaitons.
I think Vim's language would be a perfect fit for keyboard driven spreadsheet editing. What do you think?
Hey @melkster thanks for your feedback. Custom keyboard bindings are absolutely something we are thinking about.
We will have a standard set of keyboard bindings, and a mode that mimics Excel, as well as the ability to use third party plugins to define bindings. I realize that Vim mode would be a bit more than just key bindings, but when we build this functionality I will keep this in mind, and hopefully, we come up with a design that will support it!
Our philosophy for Quadratic is similar to modern IDEs. We want our users to be able to customize the experience to what works best for them. Themes, extensions, keybindings, etc.
Have you used the Emacs spreadsheet? I am curious if the modal editing is similar to what you are describing.
Thank you for your response @davidkircos
I hadn't heard of that particular Emacs plugin. Although it seems to be more keyboard oriented, it apperas to be lacking modality. I.e. it only has one mode which means that any action that isn't text insertion requires you to hold down a bunch of modifiers on your keyboard (ctrl, shift, alt) which quickly limits the amount of available actions and how easy they are to perform.
Another great idea from the Vim world is the ability to use sentences to perform actions. For instance, from normal mode you could press the keys d 4 j which is read "delete four down" (remember that h/j/k/l correspond to left/down/up/right), which in a spreadsheet would delete four cells down from where you have your cursor. This is a simple, yet powerful idea because it lets you combine various verbs (like d) with a multitude of nouns (like 4j) to perform very specific actions. Notice also that the various words have very simple mnemonics because they live on their corresponding keys: delete, paste, yank (Vim's word for "copy"), etc. This whole idea of sentences is really only possible in an editor with modes, because the editor needs to know when you want to type in literal text and when you want to perform sentence-based actions to edit the document (for instance d4j).
No plans in the current roadmap to support this.