vopwn55 / powerlang-issues

0 stars 0 forks source link

(Enhancement) IDE text zooming, undo/redo keybinds, etc. #21

Closed Paracosm-Daemon closed 3 weeks ago

Paracosm-Daemon commented 3 weeks ago

Though undoing and redoing is in the IDE, being unable to control the undo history through CTRL+Z/CTRL+U (or CTRL+SHIFT+Z, unless these history keybinds can be controlled through SHIFT itself rather than CTRL) can be a miniscule but frustrating time-loss, especially given small qualms with holding CTRL and left/right shift or backspace.

When editing, I tend to quickly select or modify code with the CTRL key, though the IDE does not handle this very well:

https://github.com/user-attachments/assets/93a57512-25cc-41fa-ba84-c6643a426785

Eventually, this also leads to cases where I may use the CTRL + BACKSPACE functionality to delete a bulk of letters at once, but this causes issues:

https://github.com/user-attachments/assets/b953d867-75c1-4660-ab32-c2ec3d3d75cd

This, mixed with the lack of shortcuts for undoing can cause the workflow to be interrupted often.

Shortcuts aside, the lack of text zooming can also be an issue. I have a large monitor, thus I tend to zoom in text to make things easier to read, given I am nearsighted. Here is a comparison between the IDE and my Studio settings:

IDE: image

Studio: image

vopwn55 commented 3 weeks ago

You bring up very good points Paracosm-Daemon.

When editing, I tend to quickly select or modify code with the CTRL key, though the IDE does not handle this very well

The code box is just a native Roblox TextBox. Therefore I do not have control over how text is selected, unfortunately.

Though undoing and redoing is in the IDE, being unable to control the undo history through CTRL+Z/CTRL+U (or CTRL+SHIFT+Z, unless these history keybinds can be controlled through SHIFT itself rather than CTRL) can be a miniscule but frustrating time-loss, especially given small qualms with holding CTRL and left/right shift or backspace.

You're right. I could add a Ctrl+Shift+Z / Ctrl+Shift+Y series of keybinds that will control undo/redo.

Shortcuts aside, the lack of text zooming can also be an issue. I have a large monitor, thus I tend to zoom in text to make things easier to read, given I am nearsighted. Here is a comparison between the IDE and my Studio settings

Unfortunately it's not possible for the IDE to retrieve Studio settings due to the font setting being inaccessible. However I can add zoom in and zoom out buttons (and likely respective shortcuts, such as Ctrl+Shift++).

Paracosm-Daemon commented 3 weeks ago

The code box is just a native Roblox TextBox. Therefore I do not have control over how text is selected, unfortunately.

Noted! I'm aware of the ability to access the caret position and its selection; maybe in the future, though it's a sizeable undertaking, you could try rewriting Roblox's native input handler for textboxes to better suit an IDE

Unfortunately it's not possible for the IDE to retrieve Studio settings due to the font setting being inaccessible.

Apologies if it seemed like I meant that - I mainly used that as a point-of-reference, since the font for the IDE appears half the size of what I have the font size in my studio settings as. But yes, CTRL + -/+ would be greatly appreciated - if you could, CTRL + Scrollwheel is also an option

vopwn55 commented 3 weeks ago

IDEPlugin_Dev.dmp This version of the plugin should have zoom functionality and it will be incorporated officially with the release of 0.11. Unfortunately I was unable to add keyboard shortcuts - both UserInputService and ContextActionService (and their respective instance events) just seem to not work in plugin windows. Please test it and let me know what you think.

(Note that you will need to rename the extension of the file to .rbxm)

Paracosm-Daemon commented 3 weeks ago

Thank you very much! It's unfortunate that shortcuts aren't available, but the addition of zooming makes it much better for me to work nonetheless.