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
Closed

Feature request: Indentation and commenting options #516

bazilione opened this issue Jun 28, 2018 · 5 comments

Comments

@bazilione
Copy link

@bazilione 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
Copy link
Member

@ntoll 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
Copy link
Member

@ntoll 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
Copy link

@mossworks 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
Copy link
Author

@bazilione bazilione commented Aug 7, 2018

@carlosperate
Copy link
Member

@carlosperate 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
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants