I'm trying to make it so urls are highlighted and a shortcut can be used when the cursor is on top of one to open it in browser. Added this to a syntax file:
syn match matchURL '/http[s]\?:\/\/[[:alnum:]%\/_#.-]*/' hi matchURL ctermfg=14
https://www.archlinux.org but it didn't get highlighted. (Ofc I tested simpler syn matches and highlights to ensure that syntax highlighting is working, so I conclude the regex is probably wrong?). How to make highlight urls then?
Also once urls are highlighted, is there a simple way to copy to a register/variable the text that is highlighted under the cursor?