2011-01-21 63 views
0

是否可以格式化以下文本,以便后面的文本位于特定列(如70)中?如何对齐文本?

body: 
X width:         100% 
// This is comment 
    min-> 
X width: 960px 
    a: 
    &:hoover: 
X  family:      $main_fonts 
    background-> 
X image:         url('img/image.png') 
X position:  top center 
X repeat:   repeat 
X color: #000 

但只是对于包含X线(X在前面仅仅是示出格式化哪一行,它不是在真实文件)。我试图通过查尔斯·坎贝尔,但没有运气:(使用对齐

所得到的文本应该是这样的:

body: 
    width:            100% 
// This is comment 
    min-> 
    width:           960px 
    a: 
    &:hoover: 
     family:          $main_fonts 
    background-> 
    image:           url('img/image.png') 
    position:          top center 
    repeat:           repeat 
    color:            #000 

回答

1

在与表格插件VIM,采用V至面向行直观地选择要格式化的区域然后:'<,'>表格/:\ s + \ zs/l0l70 (和spiiph是对的:)

+0

是的,它工作:)谢谢! – 2011-01-22 17:24:22