codepod
codepod copied to clipboard
Command mode and edit mode
Jupyter/VIM has two modes, Edit/Insert mode and Command mode (ESC+:).
We should support both too?
In command mode, we can change the interpreter (Python, Markdown, Shell) and in edit mode we edit the code.
Yes, we should have this. Further, when a pod is not in edit mode, we should be able to use anywhere on the pod as the handle. @nibilin33 maybe you can help on this?
As for changing interpreter, let’s do a toolbar button instead. I’ll handle this. We can have the VIM keyboard binding later in another issue/PR.
what...add a button to change the interpreter in the toolbar?
Yeah, after a second thought, we don’t need to change the interpreter for a pod. We can just create different types of pods at the beginning (Python, shell, markdown, other languages).
Where do you want to let users select the types of pods? @lihebi
In the right click context menu? In Jupyter, users also choose to create markdown or code cells at the beginning.
In Jupyter or VSCode's Jupyter, you can edit the type of a pod, code to markdown or back.
I am against using right clicks. It's not explicit. Maybe just an icon in the toolbar of a pod? Associate a shortcut key with it. (It's hard to do on laptop touchpads. It's not touch-friendly. And it requires users to keep mind that there are two kinds of clicks. )
One thing we need to keep in mind in advance is that we will support mixed runtimes/kernels in one repo. So our switch is not binary (code of only one language and Markdown) as in Jupyter but multi-class (e.g., Python, Markdown, and bash).
The toolbar sounds good. For touch screen, the user could long press the pod, and pop up some bigger buttons. E.g., this is tg's UI: