// Sublime Text 3 : macro to enable shellcheck and set the dictionary to French // I suggest this keyboard shortcut (edit your *.sublime-keymap file) // { "keys": ["ctrl+k", "ctrl+f"], "command": "run_macro_file", "args": // {"file": "res://Packages/User/french-spellcheck.sublime-macro"} // }, // (C) Lilian Besson, 2016. // See http://perso.crans.org/besson/publis/ST3/ for more ST3 build systems! // and http://docs.sublimetext.info/en/latest/extensibility/macros.html for the doc on ST3 build system. [ { "command": "set_setting", "args": { "setting": "spell_check", "value": true } }, { "command": "set_setting", "args": { "setting": "dictionary", "value": "Packages/Language - French - Français/fr_FR.dic" } }, // FIXME add an informal message as a system notification { "command": "exec", "args": { "cmd": [ // "/usr/bin/env", // "/usr/bin/notify-send", // XXX put absolute path? "notify-send", // XXX put absolute path? "--icon", "/opt/sublime_text/Icon/256x256/sublime-text.png", // icon "'Sublime Text 3'", // title "' - Spell check enabled\n - Switched dictionary to French (\"Language - French - Français/fr_FR.dic\")'", // body ], // "env": [ // {"DISPLAY": ":0.0"}, // if it does not work without it // ], } }, // // FIXME add a debug message in the status_bar ? // // https://stackoverflow.com/questions/39373728/how-to-change-the-sublime-text-3-statusbar-message-in-a-command-or-macro-no-plu // { // "command": "set_status", // "args": { // "value": "Switch to French dictionary" // } // } // With the internal Python API, I would like this behavior: // view.set_status("Spelling", "Switch to English...") // time.sleep(5) # sleep for 5 seconds // view.set_status("Spelling", "") ]