[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] :s/xxx/currentfilename/g ?
From: |
Thomas Dickey |
Subject: |
Re: [vile] :s/xxx/currentfilename/g ? |
Date: |
Mon, 5 Jan 2015 16:59:08 -0500 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Mon, Jan 05, 2015 at 04:17:33PM -0500, address@hidden wrote:
> I tried searching through the help, and I don't know if I missed it.
>
> Is there something generic I can do to accomplish
>
> :s/xxx/currentfilename/g
>
> where the same code will replace whatever the current file name happens
> to be ?
You could put that into a macro, and run the macro.
Something like this works (doesn't check if the parameter is empty though):
" vile:vilemode
store-procedure to-cfilname string="XXX string"
substitute-all-til end-of-line $1 $cfilname
~endm
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature