I’m trying to achieve such behaviour but without success. Does ST has a command to move to a next/previous line?
Toggle Comment and move to the next/previous line
I often create a script with Autohotkey to work around software limitations. If you are interested in learning, it is worthwhile, as you can complement or create new hotkeys regardless of the software manufacturer.
If you have the Chain of Command installed, you can write a simple key binding for it :-
{
"keys": ["ctrl+alt+shift+n"],
"command": "chain",
"args": {
"commands": [
["toggle_comment"],
["move", {
"by": "lines",
"forward": true
}]
]
}
},
forward
-> true
will advance the cursor to the next line & false
will advance it to the previous line.
I’m going to create an apple script or something if the situation needs it
Oh maybe this would be a good opportunity to learn JXA.
You can also do this in core Sublime with no plugins by creating a macro that executes the toggle command and then moves down a line:
Nice one. I rarely use macros but this approach is nicer (plus no need for any plugin).