tpope / vim-unimpaired

unimpaired.vim: Pairs of handy bracket mappings

Home Page:https://www.vim.org/scripts/script.php?script_id=1590

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

URL shortening / expansion

mcepl opened this issue · comments

Would it be possible to add URL shortening / expansion pair? (not sure about the name of the command; X?)

The service I have in mind to be used is is.gd which allows getting shortened URL by sending GET request, for example to shorten https://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q=louth&sll=53.800651,-4.064941&sspn=33.219383,38.803711&ie=UTF8&hq=&hnear=Louth,+United+Kingdom&ll=53.370272,-0.004034&spn=0.064883,0.075788&z=14 :

curl -s https://is.gd/create.php?format=simple&url=https%3A%2F%2Fmaps.google.co.uk%2Fmaps%3Ff%3Dq%26source%3Ds_q%26hl%3Den%26geocode%3D%26q%3Dlouth%26sll%3D53.800651%2C-4.064941%26sspn%3D33.219383%2C38.803711%26ie%3DUTF8%26hq%3D%26hnear%3DLouth%2C%2BUnited%2BKingdom%26ll%3D53.370272%2C-0.004034%26spn%3D0.064883%2C0.075788%26z%3D14

which returns https://is.gd/kiARyX.

I don't think this is a good fit. Wrapping curl is a big distraction, and I don't want to play favorites with URL shorteners.