I am trying to reverse a string, so that
'abc defg hij' becomes
'jih gfed cba'. The solution I came up with is
join(reverse(split(l:text, '.\zs')), '')
Is there a more elegant solution or should I stick with what I have come up with?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.Sign up to join this community