Let's say I have a list of URLs separated by a white space with their corresponding titles.
http://url1.com/qfwarsas/ gb_title 1 - 1
http://url2.com/arsas/ xe_title 2 - 2
http://url3.com/qfsas ah_title 3 - 3
I'm trying to sort the lines by the titles to look like this:
http://url3.com/qfsas ah_title 3 - 3
http://url1.com/qfwarsas/ gb_title 1 - 1
http://url2.com/arsas/ xe_title 2 - 2
I can do it by running a simple macro to copy out the first letter of each title to the front of the line, then ctrl+v sort the blocks, then remove the first letters of each line. I wonder if there's a way to do it using regex and visual block selection?
Regex to get title first letters selection is
:s/\v[^ ]* (.)/\1/
but when i try to convert that into visual block selection i'm running into issues.
Any ideas?