Found a way to do this:
Add protocol handler in Firefox
Open firefox and go to about: config
Add the following keys
network.protocol-handler.warn-external.txmt boolean false
network.protocol-handler.external.txmt boolean true
network.protocol-handler.app.txmt string ~/protocol_handler/prot.sh
network.protocol-handler.expose.txmt boolean false
Create 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(/\&\;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.
Modify the executable file:
$ chmod +x ~/protocol_handler/prot.sh
, Firefox .
"vim://", txmt vim. Rails (rails-footer, ) txmt, , .
!
Berns