How to align // style comments
neybar opened this issue · comments
James Lance commented
I have code like this:
var foo = "1"; // foo variable
var foofoo = "22"; // foofoo variable
I'm having a hard time getting the comments to actually align. I've tried variations on the following sequence: gavip; ctrl-x; /
For the actual regex, I've tried /
, \/
, and so on.
Rodrigo Stuchi commented
Have you tried by command-line:
:EasyAling/\/\//
Junegunn Choi commented
-<space>
(around the last whitespaces) is the easiest way to achieve this, since whitespaces in comment (after //
) are ignored by default.