Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding keybinds to CodeEditor/text editor components #8635

Open
huyaboo opened this issue Oct 17, 2024 · 0 comments
Open

Adding keybinds to CodeEditor/text editor components #8635

huyaboo opened this issue Oct 17, 2024 · 0 comments
Assignees
Labels
brainstorming enhancement New feature or request

Comments

@huyaboo
Copy link
Member

huyaboo commented Oct 17, 2024

Is your feature request related to a problem? Please describe.
One of the painpoints when creating visualizations is the lack of keybinds. When typing longer queries in Dev tools or making Vega visualizations, the text body can get lengthy. It would be nice if the editor components within these visualizations had some sort of a "Vim mode" toggle so users familiar with vim-like keybinds can type.

Describe the solution you'd like
The @osd/monaco package provides the monaco text editor that OSD consumes. Specifically, inside CodeEditor component, it provides a common component for text-based visualization editors to consume. There already exists a package monaco-vim that integrates Vim mode into monaco.

To configure, we can add a global advanced UI setting to toggle on keybind mode and have some UI setting for each individual editor such that these configs override the global default (needs investigation)

Describe alternatives you've considered

  • Introducing a plugin to provide the components would be useful to other plugins, but core cannot consume this plugin. In general, we could find a better way to import custom plugin components into core but this is orthogonal to feature request
  • Introducing a new OSD component that uses CodeMirror as the editor and using codemirror-vim. This is convenient, but would require creating a whole new component for plugins to consume
@huyaboo huyaboo added enhancement New feature or request brainstorming labels Oct 17, 2024
@huyaboo huyaboo self-assigned this Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brainstorming enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant