3 ms·
I'd love to have an editor scripting language in VS Code that would be a lighter-weight way to create an editing macro than building an extension. Despite the a
by SiVal 9y ago
I'd love to have an editor scripting language in VS Code that would be a lighter-weight way to create an editing macro than building an extension. Despite the annoying scripting languages, both vim and emacs get a lot of their power and popularity by enabling users to easily add little, custom editing features that they can then bind to keystrokes.
Not a macro recorder, but a real scripting language in which cursors, multiple selections, find results, regexes, files, folders, editor panels, the built-in terminal, menu items, semantics provided by an extension (ex: "PythonFunctionName"), external processes, git merge conflict lines, etc., were first-class objects.
Now there's a stretch goal....
- deleted 9y ago[deleted]
- vanderZwan 9y agoGiven that it's an Electron app, wouldn't it suffice to use plain JavaScript (or TypeScript, given that part of the editor's raison d'être), and add a few extra "built-in" modules specific to the VS Code environment?
- SiVal 9y agoYes, I think that would be just fine as long as the modules encapsulated the "native" functionality of the editor. As long as developers could easily orchestrate and build on top of existing editor (& built-in git, terminal, extension, etc.) functionality without having to reimplement it from basic JS string processing, JS (incl. but not requiring TS) would seem the logical choice.
- omaranto 9y agoThe scripting language would most likely be JavaScript, of course. I don't use VS Code and I'm surprised there isn't already a lightweight way to run some JavaScript code to script the editor. Are you saying you need to bundle up any code you write in a proper extension before you are allowed to run it? Sounds bureaucratic to me, VS Code should learn from Emacs.