HotCommands icon indicating copy to clipboard operation
HotCommands copied to clipboard

ToggleComment Issues

Open Enteleform opened this issue 7 years ago • 2 comments

Just ran into 2 issues with the ToggleComment command.

The first one is more of an unexpected difference in implementation.  Having worked with various editors (Sublime Text, Atom, Light Table, misc JetBrains IDEs, etc.), the 'move down a line after commenting' action is something I've never come across until now.  Any way this could be implemented as an option? 

The second one pertains to text in the surrounding regions of the selection.  For some reason, it becomes indented after the selected region is uncommented:

hotcommands_comment

Enteleform avatar Dec 22 '17 12:12 Enteleform

The 'move down a line after commenting' is a feature taken from the JetBrains implementation in IntelliJ and R#. It only moves down a line if there is no selection. But, all the same, for users who want a different behavior, an option would be handy.

I've never created an Options page before. I guess this seems like a good enough reason to try. I'll see what I can do.

If anyone else thinks they can do it, please go ahead and submit a PR! Thanks.

justcla avatar Dec 22 '17 14:12 justcla

As for the strange indenting behavior - that's odd. It shouldn't be touching anything outside the affected region. I'll see if I can find out what's going on.

justcla avatar Dec 22 '17 14:12 justcla