junegunn / vim-easy-align

:sunflower: A Vim alignment plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to align // style comments

neybar opened this issue · comments

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.

Have you tried by command-line:

:EasyAling/\/\//

-<space> (around the last whitespaces) is the easiest way to achieve this, since whitespaces in comment (after //) are ignored by default.