NOTE: I haven't spent a great deal of time playing with utl, trying to figure out these issues. I checked utl's helpdoc, but didn't see any obvious answers. I did some quick google searches and didn't find anything, searched github for published configurations, but didn't find anything, so I thought I'd post here and see if some expert out there knows it off the top of their head, or can point me in the direction of some relevant information.
I use utl.vim to launch urls from vim.
I only use it on OS X at the moment, with the standard, simple configuration:
if has("mac")
let g:utl_cfg_hdl_scm_http_system = "!open '%u'"
endif
I'm trying to tackle a several issues with it ...
Markdown URLs
My experience with utl.vim so far has been that it will work with URLs written as:
[Google]: http://google.com
However it will not work with:
[Google](http://google.com) <- the trailing ')' breaks the parser
[google][Google] <- this is a reference link
[Google]: http://google.com <- this defines the reference
## Header <- a header creates an id that can be linked to
[header](#header) <- link to that header
[Relative URL]: ../otherfile.md <- a file relative url
[Relative Anchor]: ../otherfile.md#someheader <- a file relative url with an anchor
Any ideas how to make any of these work (especially the first example)?
Pausing VIM
When a URL is launched via UTL, it pauses vim and switches to the default browser. There are several task dispatchers (vim-dispatch is probably the most well known) around now, so I was curious if it's possible to make utl.vim launch a URL without activating the browser, and without pausing vim (and without automatically switching to the browser).
Changing Behavior
In some cases, I'd like to launch URLS differently - in firefox rather than chrome, or pipe it through to a command line script. I currently just use the basic, built in method of launching URLs (which passes them directly through to the configured URI handler (with the cursor positioned over the URL):
:Utl
Does anyone have experience configuring parameters for this to make it efficient to to specify the browser or script it should be launched with, for example:
:Utl " launches in default browser for platform (chrome on OSX, w3m on linux)
:Utl firefox " launches in firefox
:Utl curl " passes it off to a curl script which downloads the files
Tmux & w3m
When I'm in a tmux session (99.99% of the time) and on ssh (50% of the time), it would be even better to pass it through to vimux and have it spawn (or use an existing, if created) w3m insance running in a separate pane. Any ideas how this might be done?
Passing Data back through SSH Session
When SSHd into another system, it would be really awesome to be able to have Utl open the URL in the browser running on the host from which the ssh session was originated. Any suggestions?