As I author all my blog posts, including this text, as markdown documents with vim sometime I come across a word I’d like to lookup. Today I’ve added a vim command to do just this.
snippet from .vimrc or .nvimrc
function! LookUpDef(word) silent !clear execute "!open https://www.wordnik.com/words/" . a:word endfunction command! -nargs=* Dic call LookUpDef(<f-args>)
Then an example vim workflow
navigating to word, ex “faucet”, then yank inner word with
open command prompt enter command
then paste yanked txt into command prompt with <C-R>”
- press enter and watch default browser pop up with the word searched via wordnik.com