Loading ...
Sorry, an error occurred while loading the content.

Open file in Firefox

Expand Messages
  • George
    I know this isn t exactly on topic, but I m hoping someone here already has solution as to how to accomplish this. You d think finding a list of what
    Message 1 of 3 , Jan 1, 2005
    • 0 Attachment
      I know this isn't exactly on topic, but I'm hoping someone here already
      has solution as to how to accomplish this. You'd think finding a list
      of what command-line options are available would be a simple thing...

      The closest I've come is repeated references to the followng:

      mozilla -a firefox -remote 'openURL(%s,new-tab)'

      which is supposed to be Linux-specific. Either way, it doesn't work.
      And executing something like

      firefox index.html

      directly on the command-line forces a delay while Firefox does its best
      to try and resolve www.index.html.

      To try and make this message a bit more on-topic, I did stumble across a
      page which purports to explain how to implement vim-like keybindings in
      Firefox. The address is http://www.calmar.ws/firefox/index.php for
      anyone interested in giving it a shot. I'm too busy with pressing my F5
      key for the moment.

      Oh, and Happy New Year! to everyone.

      --
      George
    • Alan G Isaac
      To view current file in firefox: inoremap :up :!start c: programs firefox firefox.exe file:///%:p:gs? ?/? hth, Alan Isaac
      Message 2 of 3 , Jan 1, 2005
      • 0 Attachment
        To view current file in firefox:
        inoremap <vb <esc>:up<cr>:!start c:\programs\firefox\firefox.exe file:///%:p:gs?\\?/?<cr>

        hth,
        Alan Isaac
      • George
        ... Thanks for the reply. I m embarrassed to say I figured it out soon after I posted the question. Even worse, I found a Vim Tip on the subject. There
        Message 3 of 3 , Jan 4, 2005
        • 0 Attachment
          On Sat, Jan 01, 2005 at 10:04:23AM -0500, Alan G Isaac wrote:

          > To view current file in firefox:
          > inoremap <vb <esc>:up<cr>:!start c:\programs\firefox\firefox.exe file:///%:p:gs?\\?/?<cr>

          Thanks for the reply. I'm embarrassed to say I figured it out soon
          after I posted the question. Even worse, I found a Vim Tip on the
          subject.

          There remains, however, a minor problem with respect to loading the file
          in a new tab vs. the existing tab vs. a new window. I have Firefox
          configured to open external links in a new tab. Without an existing
          Firefox command switch to control how a given file is loaded, the
          existing setting gets used, which in my case would mean a new tab is
          opened for every reload/refresh of the html file I'm editing.

          That leaves me three options:

          a) Hold my breath for the folks at Mozilla to add a switch;

          b) Change the way I use Firefox; or

          c) Give up on the idea of loading the file from within Vim.

          --
          George
        Your message has been successfully submitted and would be delivered to recipients shortly.