I saw the following code in the DataMapper documentation, the Serial, String.. all align together, Can I do the same thing in Vim?
class Post
include DataMapper::Resource
property :id, Serial # An auto-increment integer key
property :title, String # A varchar type string, for short strings
property :body, Text # A text block, for longer string data.
property :created_at, DateTime # A DateTime, for any date you might like.
end
You can try
Tabularize.vimplugin. Run this command:What you need is a pattern to match the delimiters.
:\w\+,will match:id,,:title,, …#will match the comment sign