11
3
I have multiple blocks of text, or in other words, multiple functions like this:
def ==(other)
...
end
def to_s(full=false)
...
end
def to_a
...
end
def to_hash
...
end
def inspect
...
end
I want to sort the functions alphabetically by the function signature. How can this most easily be done in Vim?
define what you mean by function signature please. What type of functions are these? Also, on what platform are you working under OS, distribution, and version number would be VERY helpful. – mdpc – 2014-05-11T00:03:31.957
1why does this have to be done in VIM? there are excellent builtin unix/linux utilities that can be easily cobbled together for these type of things....awk comes to mind. – mdpc – 2014-05-11T00:04:38.030
@mdpc: By the function signature I just mean the line containing
def ...
. I'm on Linux, so any of those utilities will work for me. – Hubro – 2014-05-11T14:47:35.210