[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-team] VI et no de ligne ds subst



Salut !

Je voudrais, avec VI, faire une substitution utilisant le numero de la substitution.

Exemple:
"un
deux
trois"

Je veux:
"insert into...(1, 'un');
insert into...(2, 'deux');
insert into...(3, 'trois');"

Donc :%s/^.*$/insert into...(###, '&');/

Que dois-je mettre dans ### pour obtenir un numero de sequence ?
Je sais que CTRL-A (maj) incremente et CTRL-X decremente mais comment puis-je inserer une commande dans mon expression reguliere ?

Merci.

Eric.

--------
Visit the Linux Supertore Online: http://www.redcorp.com !
If you want to be deleted from the list, send a mail to
majordomo@rtfm.be with "unsubscribe linux-team" in the body.
Archive of the list: http://tania.be.linux.org/