I am looking for a Vim plugin that can accept a single line statement as follows:
foo = self.some_method(param1="hi", param2="there")
and turn it into this:
foo = self.some_method(
param1="hi",
param2="there"
)
Big bonus points if he can add a comma to the last argument, for example:
foo = self.some_method(
param1="hi",
param2="there",
)
And finally, I would like to be able to turn the multi-line version back into one line, but for me, just one script with one or several lines is enough. Use Jfor reconnecting to a line is fast enough for most of the time.
I'm not looking for a solution that formats like this:
foo = self.some_method(param1="hi",
param2="there")
source
share