andrewheiss / SublimeStataEnhanced

Plugin that adds support for Stata 11–15 for Sublime Text 2 and 3
55 stars 22 forks source link

Fails to recognize comment #30

Open NilsEnevoldsen opened 9 years ago

NilsEnevoldsen commented 9 years ago

Replication instructions

Send the selection (close to an MWE)

* '
di "`'"
/*
*/
di ""

Result

/* and */ are not recognized as parts of a comment. They are sent to Stata as commands.

Likely culprit

This thing here:

This is really brute force and hackish. Ideally we could use ST scopes to only remove comments instead of trying to parse everything with regex (since there will inevitably be edge cases that should/shouldn't be removed). ST kind of has that functionality: self.view.find_by_selector('comment') But this is a good stopgap for now.

I am using Stata 14 on OS X 10.10.

akashc84 commented 7 years ago

Would appreciate it a lot if this issue can be resolved. This is very hard to manage on projects with multiple collaborators, with different styles of commenting. I use Stata 14.