Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby vim表格化对齐选定行_Ruby_Vim - Fatal编程技术网

Ruby vim表格化对齐选定行

Ruby vim表格化对齐选定行,ruby,vim,Ruby,Vim,如何将所选行与Vim表格插件对齐? 我的代码如下: def initialize(attributes = {}) @name = attributes[:name] @email = attributes[:email] end :Tab/=即使在视觉模式下选择行@name和@email,也会产生这种效果 def initialize(attributes = {}) @name = attributes[:name] @email

如何将所选行与Vim表格插件对齐?
我的代码如下:

def initialize(attributes = {})
  @name = attributes[:name]  
  @email = attributes[:email]
end
:Tab/=
即使在视觉模式下选择行
@name
@email
,也会产生这种效果

def initialize(attributes = {})
  @name                   = attributes[:name]  
  @email                  = attributes[:email]
end
如何使vim表格化插件格式化:

def initialize(attributes = {})
  @name  = attributes[:name]  
  @email = attributes[:email]
end

即使有一行(即
@email
行),选中的vim也会将
@name
行和
@email
行中的
=
与attributes
=

中的
=/p>行对齐,除非您已经下定决心要使用或(我猜您是指第一行),否则还有()。它们似乎做得差不多,但Align在这段代码上对我来说很好

  • 对齐整个文件:
    :Align=
  • 在可视行上对齐:
    t=
    :“我的版本(0.1)符合您的要求。