Last Updated: February 25, 2016
· tacahiroy

Vim: Chef's attribute notation converter

Are you tired of typing thousands of brackets like node["foo"]["bar"]?
Here is the answer. You can convert to node[:foo][:bar] Vim easily.

You can use 3 styles of the Chef's attribute notation.


It's pretty hard to type characters like node[:foo][:bar] or node["foo"]["bar"],
so the your little finger will must be broken.
Too much brackets!

Though you must hate this style, it's unavoidable probably.

However, you can convert into node[:foo][:bar] very easy if you're a Vimmer.

Please copy the code in the link below to your .vimrc.

After that, if you type and <C-y>x, you will get node[:foo][:bar].