Created
August 26, 2012 04:36
-
-
Save yjsoon/3474117 to your computer and use it in GitHub Desktop.
vim search Dash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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
More advanced version here: https://gist.github.com/3485271