In Sublime Text 3, I'm using the WordCount plugin to know how long a file is, in terms of words.
However, this plugin slows down the editor when a huge text file is open. It's a file I use quite often, so this proves annoying. (The file is close to 6MB/1 million words and used on a recent MacBookPro.)
As such, I want to be able to disable and re-enable the WordCount plugin quickly and easily. I know how to do disable a plugin through Palette commands but I'm not happy with this solution.
Instead, I'd like to use a custom menu. I can create the custom menu itself (with a file named Main.sublime-menu located in /Users/*myusername*/Library/Application Support/Sublime Text 3/Packages/User/Main.sublime-menu) :
[
{
"caption": "Custom",
"id": "custom",
"children":
[
{ "command": "*somecommandhere*", "args": {}, "caption": "Toggle WordCount plugin", "checkbox": true }
]
}
]
However, I don't know which command to use to disable/re-enable a plugin. I assume this would be the same command from the console and inside of a menu file.