How can I reverse a word in Vim? Preferably with a regex or normal-mode commands, but other methods are welcome too:
<word => drow
if your version of VIM supports it you can do vw\is or viw\is (put your cursor at the first letter of the word before typing the command)... but I have had a lot of compatibility issues with that. Not sure what has to be compiled in or turned on but this only works sometimes.
EDIT:
\is is:
:let old_reg_a=@a
\ :let old_reg=@"
\ gv"ay :let @a=substitute(@a, '.\(.*\)\@=', '\=@a[strlen(submatch(1))]', 'g')
\ gvca :let @a=old_reg_a
\ :let @"=old_reg
Didn't remember where it came from but a google search come this article on vim.wikia.com. Which shows the same thing so I guess that's it.