Create a gist now

Instantly share code, notes, and snippets.

" Stick it somewhere (.vimrc?)
" Works with Gvim and Macvim
" Windows users should go back to their IE6
" Usage:
" :Maps Birmingham,UK
function! s:Maps(search)
let search = a:search
let p1 = ""
let p2 = "&zoom=13&size=400x400&maptype=roadmap&sensor=true&format=png"
let url =
if has('gui')
if has('gui_gnome')
let cmd = "xdg-open"
elseif has('gui_macvim')
let cmd = "qlmanage -p"
elseif has('gui_win32')
" WTF?
execute ' ! curl -L "'.url.'" > map | '.cmd.' map'
command! -bar -nargs=* Maps call s:Maps("<args>")

"Windows users should go back to their IE6"




Bram Moolenaar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment