oskar wrote:
Hello

that works if I execute the command in the normal mode in VIM. Now my next
question is:

How can I use the %s command from a VIM script in order to modify a given
line of a file?

Thank you

To change "foo" to "bar" everywhere at line 1234:

        1234s/foo/bar/g

(i.e., in a script the initial : is not needed.)

see
        :help :s
        :help range
        :help script


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
142. You dream about creating the world's greatest web site.

Reply via email to