Allow me to sink inputs to the script editor

As a Roblox developer it is currently too hard to figure out what’s being typed in real-time in the script editor.

I’ve been trying Vim recently on other projects and found it to be really powerful, and I wanted to emulate a lot of Vim’s functionality inside Studio’s script editor, I’ve run into lots of problems though, mainly with the fact that I cant sink inputs in the script editor.

I’ve tried a few workarounds for this as well but none of them work.

  • Using a DockWidget to capture inputs and apply them to the open ScriptDocument
    The cursor disappears as soon as the script window loses focus, basically defeating the point of using HJKL to move it

  • Using TextDocumentDidChange to detect newly inputted text
    This is unfathomably hacky, and requires updaring the source to remove it after, not to mention that you cant even capture commands like Esc or Ctrl-R. Also Live Scripting (love it!)

In a realistic world, I’d like plugins to be able to capture inputs on an open script document, and optionally sink them so a plugin can do something else.

If security is an issue, then a notification stating that a plugin is capturing input, or a permission setting to block it from doing as such.

If Roblox were to address this issue I’d be able to add custom key-based macros to the script editor or more simply, figure out whats being typed.

7 Likes

Why don’t you just make multiple DockWidgetPluginGuis with a textbox on each and add most of studio and lot of vim’s functionality inside it? (1 DockWidgetPluginGui for each script open).

What I mean is to instead of adding functionality to script editor, just create a custom script editor plugin, but I certainly agree that RobloxPluginGuiService’s UI and script editor should be editable.

1 Like

I used Vim as an example as its a well-known keyboard based text editor. I could easily have gone with something like emacs, which is in the same vein.

The reason I’d rather not recreate the entire script editor is that it has a lot of conveniences such as autocompletes (though this probably wouldn’t be triggered), analysis and linting. Not to mention live scripting.

1 Like

Can’t you get plugin inputs while a plugin is active? or that doesnt work on script menu?
You could configure a keybind. Still, I don’t know how to get stuff like the position of the editor cursor where you write (not the mouse loc).