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

Feature request: Indentation and commenting options #516

Closed
bazilione opened this Issue Jun 28, 2018 · 5 comments

Comments

Projects
None yet
4 participants
@bazilione
Copy link

bazilione commented Jun 28, 2018

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.

Best, Vasily.

@ntoll

This comment has been minimized.

Copy link
Member

ntoll commented Jul 4, 2018

Hi @bazilione,

Good call.

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.

@ntoll ntoll closed this in 1c85018 Jul 4, 2018

@ntoll

This comment has been minimized.

Copy link
Member

ntoll commented Jul 4, 2018

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.

toggle_comments

@mossworks

This comment has been minimized.

Copy link

mossworks commented Jul 14, 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.

@bazilione

This comment has been minimized.

Copy link
Author

bazilione commented Aug 7, 2018

@carlosperate

This comment has been minimized.

Copy link
Member

carlosperate commented Aug 16, 2018

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.