I am looking for a way how to transfer this (and similar) block of text:
dollar_value: str = field(init=False)
dollar_symbol: str = field(init=False)
dollar_unit: str = field(init=False)
euro_value: str = field(init=False)
euro_symbol: str = field(init=False)
euro_unit: str = field(init=False)
bitcoin_value: str = field(init=False)
bitcoin_symbol: str = field(init=False)
bitcoint_unit: str = field(init=False)
ether_value: str = field(init=False)
ether_symbol: str = field(init=False)
ether_unit: str = field(init=False)
litecoin_value: str = field(init=False)
litecoin_symbol: str = field(init=False)
litecoin_unit: str = field(init=False)
into this
dollar_value: str = field(init=False)
euro_value: str = field(init=False)
bitcoin_value: str = field(init=False)
ether_value: str = field(init=False)
litecoin_value: str = field(init=False)
dollar_symbol: str = field(init=False)
euro_symbol: str = field(init=False)
bitcoin_symbol: str = field(init=False)
ether_symbol: str = field(init=False)
litecoin_symbol: str = field(init=False)
dollar_unit: str = field(init=False)
euro_unit: str = field(init=False)
bitcoint_unit: str = field(init=False)
ether_unit: str = field(init=False)
litecoin_unit: str = field(init=False)
I though maybe in this particular case a retrograde sorting macro would be helpful (like normal sorting, but starting with the last letter of the word or line, progressing towards the first letter.
Is there a way to do retrograde sort in vim? Or what would be a possible approch to this?
:sort /.\{-}_/
work? *nix sort will let you specify delimiters and fields, but so will vim's if you're careful