Vim tabular plugin question

Front

@stallone = Factory :user, :name => 'Sylvester', :age => 64 @schwarzenegger = Factory :user, :name => 'Arnold', :age => 63 

Magic...

After

 @stallone = Factory :user, :name => 'Sylvester', :age => 64 @schwarzenegger = Factory :user, :name => 'Arnold', :age => 63 

How to do this alignment with a table plugin for VIM?

+2
source share
1 answer

I don't know Tabular ( looks pretty neat), but it seems that cutalion has a solution.

Just match this to something:

 map <Leader>a :Tab / = /l0<CR>:Tab / :/l0<CR> 

If you need to do some sort of selectiong, add gv (reselecting the last selection) if necessary.

+2
source

Source: https://habr.com/ru/post/1445316/


All Articles