-
Notifications
You must be signed in to change notification settings - Fork 18
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
jsx uncomment not work #23
Comments
I sent some commits on the master branch to fix the issue for single line comments. Unfortunately for multi line comments I still have no solution. |
I'll have to use python scripts to fix the comment toggle. I'll give it a shot this week. |
@faiwer |
@borela, I don't know exactly, but it works in babel :) Aslo eslint shows the <Tag {/* comment */}/> How do you can comment line in an attribute jsx section another way? |
@faiwer I released a patch https://github.com/borela/naomi/releases/tag/v3.1.0 that will highlight Comment toggling is wrong yet specially for attributes. |
Thank you! |
@Ding-Fan I am researching the sublime api to fix this one through a plugin. |
I created a plugin #92 that should be able to toggle JS/JSX comments, the code is here https://github.com/borela/naomi/blob/feature/comment-toggle-plugin/plugin/ToggleJsxComment.py I would love feedback before merging and realeasing it, can you guys take a look at it? I did some tests locally and tried to fine tune it to get the UX right (it turns out, coding such feature is not intuitive at all). |
I don't know how to use the single .py file with sublime3 so I removed Naomi through "Package Control: Remove Package", followed Manual Installation installed it, restarted Sublime3. Nothing changed. |
@Ding-Fan
|
I am doing some final tweaks, it looks like I got most edge cases, almost ready to release it. |
I did some tests and it looks like it is detecting correctly when to add the braces even for block comments, released it: https://github.com/borela/naomi/releases/tag/v3.8.0 package control should pick the update in about ~2h. Feel free to reopen this issue or open new ones if it causes regression. |
@franciscolourenco I'll take a look at it at the office. |
@franciscolourenco Please check if the console (View > Show Console) shows an error when you try to comment, I am not able to reproduce it on my machine. |
@borela no errors. I'm using Sublime 3133, what about you? |
3157 I'll try with an older version. |
Just tried with 3143 but got the same results |
Found the issue, I forgot to override the shortcut for macs, the line https://github.com/borela/naomi/blob/master/Default.sublime-keymap#L229 only works for Linux and Windows while the default package uses:
for mac. I'll publish the patch in a minute. |
@franciscolourenco v3.10.1...v3.10.2 published the patch, as the shortcut for OSX was not replaced, in your case, it was using sublime's default behavior. It should be working now. |
jsx uncomment not work
The text was updated successfully, but these errors were encountered: