fREW wrote:
Does anyone know if there are any builtin commands to rotate the
current line about a character or word?

Example:
rotate about the j and just respectively
'This is just a test ' becomes 'ust a testj This is'
'This is just a test' becomes 'a test just This is'

I know it would be pretty easy to do these with macros, but I thought
there might be some builtin or something.

Thanks!


1) :s/\(^.*\)\(j\)\(.*$\)/\3\2\1
actually it will give "ust a testjThis is ".

2) :s/\(^.*\)\( just \)\(.*$\)/\3\2\1

see
        :help /\(

(Note: Without a range, :s defaults to the current line.)


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
96. On Super Bowl Sunday, you followed the score by going to the
    Yahoo main page instead of turning on the TV.

Reply via email to