Vim plugin to toggle Python function/method arguments between single- and multi-line -
i'm looking vim plugin can take single-line statement this:
foo = self.some_method(param1="hi", param2="there")
and turn this:
foo = self.some_method( param1="hi", param2="there" )
big bonus points if can append comma last argument, this:
foo = self.some_method( param1="hi", param2="there", )
and i'd able turn multi-line version single line, handling single-to-multi-line scenario alone sufficient me. using j re-join line fast enough of time.
i'm not looking solution formats this:
foo = self.some_method(param1="hi", param2="there")
with plugin: splitjoin.vim. using example can like:
foo = self.some_method(param1="hi", param2="there", param3="again")
with cursor between parenthesis, invoke using default maping gs
:
foo = self.some_method(param1="hi", param2="there", param3="again")
to return original gj
it work many languages. python can split dicts, lists, tuples, statements, imports
Comments
Post a Comment