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

Allow Single-Line Indentation Decrease With Shift-Tab #511

Open
vivid-pixel opened this issue Jun 23, 2024 · 3 comments
Open

Allow Single-Line Indentation Decrease With Shift-Tab #511

vivid-pixel opened this issue Jun 23, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@vivid-pixel
Copy link

vivid-pixel commented Jun 23, 2024

Describe the feature request (Edited because the behavior is not a bug)
Using TAB to indent works on the keyboard, but not through the toolbar menu. Shift-TAB does not work in the editor nor the toolbar.

To Reproduce
Steps to reproduce the behavior:

  1. Launch QB64 PE.
  2. Type some code blocks where you'll need to indent, nesting at least two of them.
  3. Press tab one time too many on the second block. Shift-Tab won't decrease the indentation.
  4. Press Backspace. Rather than remove one single tab/4 characters, this removes multiple indentations and brings the cursor back to the start of the line.
  5. Now press tab the correct number of times to indent how you intended.

Expected behavior
Shift-Tab should decrease spacing by the number of spaces designated in the IDE for indentation.

Screenshots
Screenshot 2024-06-22 at 9 10 07 PM

Desktop (please complete the following information):

  • OS: MacOS Sonoma 14.4.1 (23E224)
  • Program Version: QB64 PE v3.13.1
@vivid-pixel vivid-pixel added the bug Something isn't working label Jun 23, 2024
@RhoSigma-QB64
Copy link
Member

Hello vivid-pixel,
from your provided screenshot I see you've no text selected. Note that the increase/decrease functions are block operations, hence only available and working on a selected text block.

Note also that manually indenting is only useful when the automatic code indention (see menu Options > Code Layout) is disabled, otherwise the automatic process would constantly compromise your manually made indentions.

@RhoSigma-QB64 RhoSigma-QB64 removed the bug Something isn't working label Jun 23, 2024
@vivid-pixel
Copy link
Author

Ah, I assumed the indentation could still be manually de-indented like in other IDEs! I do find myself wanting to de-indent manually sometimes despite the automatic formatting, so I suppose this would be more of a feature request than bug. I do manually hit Tab so I'm just not sure why Shift-Tab can't work the other way around.

@vivid-pixel vivid-pixel changed the title Increase Indent and Decrease Indent Are Disabled Allow Single-Line Indentation Decrease With Shift-Tab Jun 26, 2024
@vivid-pixel
Copy link
Author

@RhoSigma-QB64: I appreciate you clarifying the block-indenting feature. I edited the post since this is not a bug report, but I cannot add labels. Are you able to add a label for feature enhancement?

I do think if Tab currently increases indentation by one tab or the specified number of characters, Shift-Tab should do the reverse, rather than nothing at all. Currently, indenting too far requires pressing Backspace to remove indentation, but that removes the whole line of indentation rather than just one tab, so you may have to press tab multiple times to get back into position.

I would expect this manual de-indentation to work regardless of the automatic indentation feature. If it's incorrect (whether too many, or too few spaces) then it gets corrected upon moving to the next line. Same as most other code editors, I think!

@RhoSigma-QB64 RhoSigma-QB64 added the enhancement New feature or request label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants