Re: vi and quoted strings ...
On Mon, 2003-05-05 at 03:46, Dave Selby wrote:
> What I am trying to do is change an absolute HTML path to a relative one
> ... ie
> from
>
> file:///home/web/Desktop/current/jpegs/logo.jpeg
> to
>
> jpegs/logo.jpeg
>
> In vi the following usually works ...
> :1,$s/search text/replace text/g
>
> However because the search text has / in it it brings up the error
> message "trailing characters"
> I have tried quoting it in ' ' and " " same error message. - any ideas ?
>
> Also on subject of vi, Since I have a lot of pages to change and dont
> want to miss any, I used the format ..
>
> vi xxx.html xxxx.html xxxx.html .....
>
> and moved on with
> :n
>
> Is there a way to re-do my search string so I don't have to keep
> re-typing it in ?
>
> Dave
>
try vim, you can bind certain commands to keys (function keys or
whatever), i think it is in ~/.viminfo or ~/.vimrc (do mans to find out)
either way i am pretty sure it can be done easily in vim.
vim also keeps track of last commands you did so it might be in the
"history" file for vim (which i think is ~/.viminfo)
-matt
Reply to: