Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 832587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:23:06+00:00 2026-05-15T04:23:06+00:00

I know it’s possible to open links in an html page (let’s say, if

  • 0

I know it’s possible to open links in an html page (let’s say, if you’re using Firefox) with TextMate if the link has this format:

<a href="txmt://open?url=file:///home/.../index.html.haml">View</a>

But is it possible to do a similar thing with VIM? Perhaps like so:

<a href="vim://open?url=file:///home/.../index.html.haml">View</a>

Ideally this would use an existing VIM session.

Cheers,

Bernie

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T04:23:07+00:00Added an answer on May 15, 2026 at 4:23 am

    Found a way to do it:

    Add a Protocol handler to Firefox

    Open firefox and navigate to about:config

    Add the following keys

        network.protocol-handler.warn-external.txmt   boolean   false
    
        network.protocol-handler.external.txmt        boolean   true
    
        #the last one is the path to the script we're about to create
        network.protocol-handler.app.txmt             string    ~/protocol_handler/prot.sh
    
        # I ended up needing this one as well on another machine, (no idea why)
        network.protocol-handler.expose.txmt          boolean   false
    

    Create the script ~/protocol_handler/prot.sh

    Copy and paste the following into the file:

    #! /usr/bin/env ruby
    
    
    file_result = ARGV[0].scan(/file\:\/\/((\w|\/|\.)*).*/)
    file_path = file_result[0][0]
    
    
    line_result = ARGV[0].scan(/\&amp\;line\=(\d*).*/)
    
    if line_result
      line = line_result[0][0]
      system "gvim --remote-silent +#{line} #{file_path}"
    else
      system "gvim --remote-silent #{file_path}"
    end
    

    Save the file.

    Change the file mode to be executable:

    $ chmod +x ~/protocol_handler/prot.sh
    

    I’m not sure if you have to restart Firefox or not.

    If you actually want to use the “vim://” protocol just change the ending on the network keys from txmt to vim. Since several Rails plugins (rails-footer, namely) out there already use txmt, I just used that to avoid recoding.

    Have fun!
    Berns

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know how to open a window with openGL (using Win32 or other toolkits).
I know, it's possible to define a QObject with custom properties and expose this
I know that normally there are no problems using Git from different OSs to
I know this question was asked before but I have the following simple code
I know that we can bind the data to each control within ItemTemplate as
I know I can select the lines and use something like :w ! sort
I know how to take control of the back button. I have a VideoView
I know only what I need but I do not know how to get
I know how to manually associate a file type with a .jar file: assoc
I know how to get the position touched, so now i have a CGPoint

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.