Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim Tabularize by //

Tags:

vim

tabular

How do you align comments by // with Vim Tabular plugin?

double n; // number of steps
double np; // number of particles
double q; // probability of success

I know that it's easy to align by, i.e., = like this :Tab /=. But :Tab / // adds a space between /'s and it stops to be a comment any more:

double n;  /  / number of steps
double np; /  / number of particles
double q;  /  / probability of success
like image 357
sashkello Avatar asked May 05 '13 23:05

sashkello


1 Answers

:Tabularize / \/\/ seems to work.

Here we are escaping the slashes.

like image 110
FDinoff Avatar answered Nov 15 '22 09:11

FDinoff