christoomey / vim-quicklink

A Vim plugin for quickly looking up a topic in google and inserting the relevant link
MIT License
55 stars 4 forks source link

Opening a link while cursor on reference #7

Closed sim590 closed 9 years ago

sim590 commented 9 years ago

@christoomey I've seen the youtube video where you presented vim-quicklink plugin. I was wondering what you were using for opening a "link" while the cursor was on the reference of the link and the actual url was somewhere down the document ?

[markdown][]
cursor^

[markdown]: http://en.wikipedia.org/wiki/Markdown

Typing gx doesn't work because it's not made for it. Is it part of another plugin ? I know that I could write a function that would do it, but I thought that if one was already made by you that you could incorperate it to the plugin. I think it would totally find it's place in this plugin.

In any case, I know how to do it and I could write it and create a PR for it.

christoomey commented 9 years ago

Hey @sim590, that behavior is in my vimrc rather than in vim-quicklink. The current implementation is a bit more specific to my workflow and hackier than I feel comfortable including, but certainly could be cleaned up and fit in here.

The current version of the function that does the link opening is here, and the command / mapping are defined here.

christoomey commented 9 years ago

Closing in favor of PR: https://github.com/christoomey/vim-quicklink/pull/8