I used to start all my comments from column 60.
Is there a trick in Emacs with which for the current line, anything after (and including) //
is pushed to column 60?
Example
cmp A, B // comparing against a reference
becomes
cmp A, B <-- extra spaces added until column 60 ---> // comparing against a reference
Set comment-column
to 60, and hit M-;.
Note that M-; runs comment-dwim
which tries to do what you mean. Notably, if the region is active, it will comment out the entire region. If this gets in your way, the command that does what you ask for above is comment-indent
, which you could bind to a suitable key.