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

Auto-comment will exclude existing comments #124

Open
szhorvat opened this issue Apr 21, 2019 · 1 comment
Open

Auto-comment will exclude existing comments #124

szhorvat opened this issue Apr 21, 2019 · 1 comment

Comments

@szhorvat
Copy link
Contributor

Consider code like this:

foo (* comment *)
bar

If I use the block-comment shortcut on it, I get

(*foo *)(* comment *)(*
bar*)

This is not ideal for Mathematica, as unlike some other languages, it allows nesting comments. Furthermore, uncommenting with the same shortcut leads to

foo  comment 
bar

The better outcome would be

(*foo (* comment *)
bar*)

or similar.

The same applies to the line-comment shortcut as well.

@halirutan
Copy link
Owner

I need to look into this, but the whole commenting/uncommenting logic comes from the IntelliJ API. I merely provide the tokens for starting and ending a comment.

I agree that the current situation is not optimal but I will push this back as "enhancement".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants