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

`gx` conflicts with vim-markdown mappings #11

Open sim590 opened 9 years ago

sim590 commented 9 years ago

Seems like the vim-markdown project now overrides the mapping gx and therefore conflicts with quicklink's gx mapping. What they've implemented is different from what quicklink does.

I do use both plugins and others may too. Furthermore, the code we've implemented for gx and gl would make sense for vim-markdown plugin. I was wondering if we should try merging this code into vim-markdown in order to solve the conflict? Otherwise, we should be thinking about changing the gx mapping.

@christoomey What do you think?

christoomey commented 9 years ago

Hmm, I'm fine with merging this functionality into vim-markdown, although I personally user tpope's so I would still want this behavior in quicklink. Maybe we can check if it is already defined?

sim590 commented 9 years ago

Yes. I should have thought about the fact that other markdown plugin may exist. It's best to keep the feature in the plugin since it's totally relevant and that we should not rely on other plugins for this since it's so much connected with the main feature.

Do you mean to check if gx mapping is already defined? If so, it will certainly be because it's a mapping from netrw plugin, which normally comes with vim. However, we could check the signature of the function that is being called by gx and if it's not netrw's function, we could map our function to something else. But, I find this behavior a bit strange because the mapping may not be the same for two users that have different plugins installed. I don't know. But I'm feeling I don't really understand what you mean.