A Vim plugin that helps you find words using Mac's dictionary app.
- This plug-in is only available for MacOS.
Place this in your .vimrc:
Plug 'johngrib/vim-mac-dictionary'
Then run the following in Vim:
:source %
:PlugInstall
- Launch the built-in dictionary app on your Mac.
- Enter
command +,
to enter the setting screen. - Drag the mouse over the dictionary you want to use and put it on the top line.
- Please be sure to set it because it will show only the search result of the dictionary in the top row.
- Place the cursor on a word and type
:MacDictWord
to find the dictionary. - type
:MacDictQuery
and then type the word you want to search for, it will find the dictionary.
You can register shortcuts in the following ways:
nnoremap <C-p> :MacDictWord<CR>
nnoremap <C-S-p> :MacDictQuery<CR>
" shows the raw string from the dictionary
let g:vim_mac_dictionary_use_format = 0
let g:vim_mac_dictionary_use_app = 1