aklt / rel.vim

Vim custom links to files and resources
9 stars 3 forks source link

Custom mappings to URL ...? #2

Open mcepl opened 5 years ago

mcepl commented 5 years ago

I work a lot on the SPEC files which contain openSUSE specific abbreviations, e.g., gh#aklt/rel.vim#2 for this issue. I would love to be able to go with cursor and by hitting a key shortcut (gx would be even better, but Ctrl-K is possible) open a web browser on the given URL (e.g., that would be https://github.com/aklt/rel.vim/issues/2 for this issue). Is something like that possible with this package?

aklt commented 5 years ago

Hello @mcepl The original intent of this plugin was to support custom URL schemes, but at the moment it is not mature enough for that. Thanks for the example.

mcepl commented 5 years ago

Currently I have let g:netrw_browsex_viewer='setsid osurl' (where osurl is this script https://gitlab.com/mcepl/vim-suse-changes/blob/master/osurl ), but reimplementation in VimL would be probably helpful (or even in Lua, if you care about that; I know that I have it available in my neovim, but not everybody is so happy).

aklt commented 5 years ago

Nice!

Something like that should be possible to do with rel.vim and I hope to have a look at some of that tomorrow. I am hoping to make it possible to configure how programs are opened from within vim and seeing how Neovim has a lua interpreter built in I did consider to rewrite this plugin in Lua as that would make it much more maintainable.