I tend to align code on equal signs for better readability. From this:
$ = jQuery.sub()
Survey = App.Survey
Sidebar = App.Sidebar
Main = App.Main
To this:
$ = jQuery.sub()
Survey = App.Survey
Sidebar = App.Sidebar
Main = App.Main
Is there an easy way to do this in vim?
The best plugin I found so far is Tabular.vim.
Easiest way to install it is by using the Pathogen plugin, and then cloning the Tabular git repository to
~/.vim/bundle/tabular. Full instructions in the Pathogen README.After it’s installed, using it is just a matter of putting your cursor somewhere in the paragraph you want to align and running: