Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature request: Indentation and commenting options #516
Atom and Sublime Text have convenient options (and keyboard shortcuts) for commenting and indentation. (for single and multiple lines at once.) On Mac after placing a cursor or selecting lines of code: Command + '/' (comment/uncomment) and Command + '[' and Command + ']' (for unindent/indent).
It'd be great to have these capabilities in Mu.
Mu already does the indent/un-indent trick: highlight the text with your cursor and use TAB (indent) or Shift-TAB (un-indent) to change things around.
As for toggling comments on and off... you're not the first to ask for this and I believe it'd be very useful. I'll see if I can get it into the next beta.17 release at the end of this week (feedback / testing would be really appreciated for this!).
Thanks for your contribution! N.
This was referenced
Jul 5, 2018
I gave this a shot, and I noticed that if there are any lines in the selected area that were already commented, Ctrl-K will uncomment them. It seems to be inverting the commented state of each line, rather than strictly adding or strictly removing a level of commenting.
Nicholas, Thank you for the reply and sorry for not getting back for so long. Ctrl + K does not seem to work on my Mac for commenting lines. (It deletes everything to the right from the cursor on the line.) Please suggest a solution for indenting from the keyboard. Thank you! Vasily.…
On Wed, Jul 4, 2018 at 6:43 AM, Nicholas Tollervey ***@***.*** > wrote: OK... Ctrl-K is the key binding for toggling comments (#) on and off for all highlighted lines. :-) It'll be in the beta.17 release by the end of this week. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#516 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AdGKmOebliWtAosc9X205E3iJ_LGeohdks5uDJxfgaJpZM4U7mZX> .
@bazilione on mac you'll have to use Cmd + K, could you try that and see if it works.
The full list of shorcuts can be found here: https://codewith.mu/en/tutorials/1.0/shortcuts
We should probably clarify that on macOS the Ctrl key should be replaced by the Command key, so I've created this issue in the repository for the website to add a note about it: mu-editor/mu-editor.github.io#38