Skip to content

A Vim plugin that helps you find words using macOS Dictionary.app. Support to display the result in NeoVim's Floating Window

License

Notifications You must be signed in to change notification settings

xfyuan/vim-mac-dictionary

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-mac-dictionary

A Vim plugin that helps you find words using macOS Dictionary.app.

Support to display the result in NeoVim's Floating Window.

vim-mac-dict-plugin-demo

Installation

  • This plug-in is only available for macOS.
  • Notes: the popup feature depends on vim-quickui plugin.

VimPlug

Place this in your .vimrc:

Plug 'skywind3000/vim-quickui'
Plug 'xfyuan/vim-mac-dictionary'

Then

:PlugInstall

Select a dictionary to use

  1. Launch the built-in dictionary app on your Mac.
  2. Enter command +, to enter the setting screen.
  3. 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.

setting

How To Use

  • Place the cursor on a word and type :MacDictPopup to find the dictionary, and print result in floating window.
  • Place the cursor on a word and type :MacDictWord to find the dictionary, and print result in a new buffer.
  • 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 <silent><leader>ww :MacDictPopup<CR>
nnoremap <silent><leader>wd :MacDictWord<CR>
nnoremap <silent><leader>wq :MacDictQuery<CR>

Configuration

Do not using formatted result

" shows the raw string from the dictionary
let g:vim_mac_dictionary_use_format = 0

View in app

let g:vim_mac_dictionary_use_app = 1

About

A Vim plugin that helps you find words using macOS Dictionary.app. Support to display the result in NeoVim's Floating Window

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vim Script 91.3%
  • Swift 8.7%