sponsor Vim development Vim logo Vim Book Ad

OpenURL : Opens links found on the current line; can also send emails (with mailto://)

 script karma  Rating 9/6, Downloaded by 1285  Comments, bugs, improvements  Vim wiki

created by
Jonas Møller
 
script type
utility
 
description
Type :OpenURL to start the utility.
It will then search the current line for links, if only one link is found then this link is opened.
If several links are found; OpenURL will display a prompt like this one:

1: http://www.vim.org
2: www.youtube.com
3: mailto://jonasmo441@gmail.com
?>

You then answer accordingly with a number.

The following kinds of urls are allowed:
protocol://domain.ext
protocol://www.domain.ext
protocol://www.subdomain.domain.ext
www.domain.ext
user@domain.ext

If an email address is found; mailto:// will be the assumed protocol.
If a www.___.___ link is found; http:// will be the assumed protocol.
                            
These protocols are used/found by OpenURL:
http(s)://
ftp(s)://
mailto://

You can send any bugs or feature requests to my email address.

OpenURL.vim  Copyright (C) 2013  Jonas Møller <jonasmo441@gmail.com>
    This program comes with ABSOLUTELY NO WARRANTY
    This is free software, and you are welcome to redistribute it
    under certain conditions; go to http://www.gnu.org/copyleft/gpl.html for details
 
install details
Linux/Mac/BSD:
        Put the "OpenURL.vim" file inside ~/.vim/plugin/ and restart vim

Windows:
        Put the "OpenURL.vim" file inside C:\Program Files (x86)\Vim\vim74\plugin (requires admin rights) and restart vim.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
OpenURL.vim 1.1 2013-10-31 7.0 Jonas Møller Fixed problem with dashes "-" in URLS
OpenURL.vim 1.0 2013-10-26 7.0 Jonas Møller Initial upload
ip used for rating: 3.94.202.151

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github