Skip to content

Instantly share code, notes, and snippets.

@wangshijun
Forked from Kapeli/gist:5017177
Created March 14, 2013 08:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wangshijun/5159868 to your computer and use it in GitHub Desktop.
Save wangshijun/5159868 to your computer and use it in GitHub Desktop.
" Search Dash for word under cursor
function! SearchDash()
let s:browser = "/usr/bin/open"
let s:wordUnderCursor = expand("<cword>")
let s:url = "dash://".s:wordUnderCursor
let s:cmd ="silent ! " . s:browser . " " . s:url
execute s:cmd
redraw!
endfunction
map <leader>d :call SearchDash()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment