Optimization 在Sublime Text 2中格式化空间/选项卡描述的表格2

Optimization 在Sublime Text 2中格式化空间/选项卡描述的表格2,optimization,formatting,sublimetext2,Optimization,Formatting,Sublimetext2,我在routes.rb文件中有一些代码,如: match 'subscribe' => 'home#subscribe', :as => :subscribe, :method=>:post match 'identify'=>"home#identify", :as=> :identify match 'about' => 'home#about_us', :as => :about match 'how-it-works' => 'home#h

我在routes.rb文件中有一些代码,如:

match 'subscribe' => 'home#subscribe', :as => :subscribe, :method=>:post
match 'identify'=>"home#identify", :as=> :identify
match 'about' => 'home#about_us', :as => :about
match 'how-it-works' => 'home#how_it_works', :as => :how
match 'faq' => 'home#faq', :as => :faq
match 'privacy' => 'home#privacy', :as => :privacy
是否有一种方法可以快速/轻松地将其格式化为崇高的文本,使其更像:

match 'faq'             => 'home#faq',            :as => :faq
match 'privacy'         => 'home#privacy',        :as => :privacy
…etc

这就是插件的功能。但是,我不知道它是否处理每行的多个“对齐”项。您可能需要编写自己的宏/插件来实现这一点,或者进行更多的搜索。你可能还想在Sublime文本论坛上提问,因为他们可能知道一个插件已经满足了你的需求(尽管我不能保证:)

该插件更适合你的需要。基于名为tabular的VIM插件

在命令选项板中键入对齐表格,然后输入正则表达式。对于您的代码,一个简单的正则表达式是:

=>|:作为


我知道一定有一个插件,我不知道:)谢谢!我不知道有这样的事情存在。