tell vim to let go after launching firefox

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

tell vim to let go after launching firefox

BartlebyScrivener-2

This mapping lets me put the cursor on a url and launch firefox from
within gvim.

nmap ,ff :update<CR>:silent !firefox <cWORD><CR>

However, when I do so, gvim "waits" and is unusable until I close
firefox.

How can I tell gvim to launch firefox and "let go" of the process.

I'm on Debian Etch if that matters.

Thank you,

rd


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---


Reply | Threaded
Open this post in threaded view
|

Re: tell vim to let go after launching firefox

Gary Johnson

On 2007-07-20, BartlebyScrivener <[hidden email]> wrote:

> This mapping lets me put the cursor on a url and launch firefox from
> within gvim.
>
> nmap ,ff :update<CR>:silent !firefox <cWORD><CR>
>
> However, when I do so, gvim "waits" and is unusable until I close
> firefox.
>
> How can I tell gvim to launch firefox and "let go" of the process.
>
> I'm on Debian Etch if that matters.

   nmap ,ff :update<CR>:silent !firefox <cWORD>&<CR>

That will tell the shell to run firefox in the background.

HTH,
Gary

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---


Reply | Threaded
Open this post in threaded view
|

Re: tell vim to let go after launching firefox

Tony Mechelynck
In reply to this post by BartlebyScrivener-2

BartlebyScrivener wrote:

> This mapping lets me put the cursor on a url and launch firefox from
> within gvim.
>
> nmap ,ff :update<CR>:silent !firefox <cWORD><CR>
>
> However, when I do so, gvim "waits" and is unusable until I close
> firefox.
>
> How can I tell gvim to launch firefox and "let go" of the process.
>
> I'm on Debian Etch if that matters.
>
> Thank you,
>
> rd

Add & between <cWORD> and <CR> so the shell will know to fork Firefox

If it doesn't work, then

        :map ,ff :update|silent !bash -c firefox <cWORD> &<CR>



Best regards,
Tony.
--
Dealing with failure is easy: work hard to improve.  Success is also
easy to handle: you've solved the wrong problem.  Work hard to
improve.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---


Reply | Threaded
Open this post in threaded view
|

Re: tell vim to let go after launching firefox

BartlebyScrivener-2
In reply to this post by Gary Johnson

On Jul 20, 3:42 pm, Gary Johnson <[hidden email]> wrote:
>
>    nmap ,ff :update<CR>:silent !firefox <cWORD>&<CR>
>
> That will tell the shell to run firefox in the background.

Duh!

Perfect. Thank you.  I should have asked sooner.

rd



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---