I've been writing some 65c816 assembly lately. They have some interesting commenting conventions that I was hoping VIM could help me with.
LDA $E7 ; You see, they
BEQ IfZero ; put comments like this,
INC A ; all lined up with 1 TAB
STA $E7 ; after the longest line.
IfZero:
BRK ; and this is a comment that is not lined up correctly
CPY ; this one too!
I was wondering if there is a clever way to have all the comments in the file (or in a selection) lined up on the same column.
Desired result:
LDA $E7 ; You see, they
BEQ IfZero ; put comments like this,
INC A ; all lined up with 1 TAB
STA $E7 ; after the longest line.
IfZero:
BRK ; and this is a comment that is not lined up correctly (now it is)
CPY ; this one too!
:setlocal tabstop=24