How to quickly align comments when writing vim code?
伊谢尔伦
伊谢尔伦 2017-05-16 16:42:31
0
1
758

example:

def a_func():
    a = 0  # a的说明
    bc = 1  # b的说明
    ...

It should be arranged like this:

def a_func():
    a = 0   # a的说明
    bc = 1  # b的说明
    ...

Is there any shortcut to do it in one step?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
黄舟

Plug-in Tabular https://github.com/godlygeek/tabular
http://linuxtoy.org/archives/tabular....

Select lines 2 and 3 of the big V and enter:Tab /# 如果要已等号对起就输入:Tab /=

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template