Mac​Dictionary
📚 A Sublime Text 3 / 4 package to use MacOS dictionary service in popup windows.
Details
Installs
- Total 882
- Win 0
- Mac 882
- Linux 0
Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | Sep 18 | Sep 17 | Sep 16 | Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
MacDictionary
A Sublime Text 3 / 4 package which provides a popup function for the macOS dictionary service.
Dependencies
This package depends on Sublime Markdown Popups (mdpopups). You don't need to install it separately since it's automatically installed when you use Package Control to install this package.
Installation
It's easy to install this package with Package Control. If you haven't installed Package Control yet, first install it following the instruction.
Once you've installed Pacakge Control, restart your Sublime Text and open the command palette (ctrl/cmd + shift + p). Then, find and select Package Control: Install Package
. You will see MacDictionary
in the list and select it.
Usage
Commands
This package provides the following commands.
- MacDictionary: Show definition (
mac_dictionary_show_def_for_selection
) - MacDictionary: Switch brute mode (
mac_dictionary_brute_mode_switch
)
You can run these commands with the command palette (ctrl/cmd + shift + p).
Also you can set any custom key binding to run a command:
[
{
"keys": ["shift+ctrl+d"],
"command": "mac_dictionary_show_def_for_selection"
}
]
Context menu (right click menu)
Or, you can use the context menu item Show definition
to open the definition popup.
Brute mode
Additionally, you can use a mode named brute_mode
with which the package tries to generate a popup aggressively every time when you move your mouse cursor. With the mode enabled, you don't need to call the command.
The mode is disabled by default. You can enable it through the package settings:
{
"brute_mode": true
}
You can also use MacDictionary: Switch brute mode
in the Command Palette to switch the brute_mode
.
Switching dictionaries
Although the macOS dictionary has a range of built-in and downloadable dictionaries, Apple unfortunately does not provide an API to the one that is used. Therefore, the package will return the first match from all enabled dictionaries. If you want to change that, you can do so with a workaround: In dictionary.app, open the preferences and drag your preferred dictionary (such as a thesaurus) to the top. You should see that it now has also moved to the leftmost position in the selection bar on top of the main app window.
After restarting sublime, the package will now use your new primary dictionary.
License
Licensed under the MIT license.