ctrl+shift+p filters: :st2 :st3 :win :osx :linux


by KeeMeng ST3

Macro/Keybind Mod Syntax Highlighting for Sublime Text 3



  • Total 62
  • Win 52
  • Mac 7
  • Linux 3
Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7
Windows 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 2 0 1 0 1 1 0 3 0 1 1 0 0 0 0 0 1 0 0 1 0 0 1 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 0 0 0 1 0 0 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




Macro/Keybind Mod Syntax Highlighting for Sublime Text 3 with Auto Complete and hints

Syntax highlighting & auto complete supports modules from https://spthiel.github.io/Modules/ Also contains an auto indenter made by Federal



This package was made to help coding for Macro Keybind Mod easier. To help you, I made auto complete to suggest possible actions and variable to you, and if you hover over the keywords, you can see a description and example of the command, which was taken from https://beta.mkb.gorlem.ml/api/docs. (Thanks Gorlem!) It also has an indenter made by Federal, with a fancy indent function too! After making your code, you can also use a linter to find possible bugs, such as missing brackets. To personalize this package, go to the Context Menu or Edit > MKB menu at the top of Sublime Text 3, and modify Package Settings.

Brief description of the files in the package include:

File                          | Description
MKB.py                        | Is a Python plugin file, which controls all the popups, autocompletes, indenting, and linter.
MKBdocs.css                   | CSS for dark mode on wiki
MKBdocs.json                  | Gorlem's wiki API used for popup hints.
Main.sublime-menu             | JSON file for the menu at the top.
MKB.sublime-syntax            | Is a YAML file, with many regexes and assigning scopes to the text to make them colorful.
Context.sublime-menu          | JSON file for the menu when you right click the screen.
MKB.sublime-settings          | JSON file for the settings to customize the package.
Default.sublime-keymap        | Auto %% when typing one %. 
MKB.sublime-completions       | Is a JSON file, containing specific "triggers", which will activate the auto complete.
MKB.sublime-color-scheme      | Is a json file for the custom colors of the syntax highlighter.
Miscellaneous.tmPreferences   | Helps with toggling comments.
template.sublime-color-scheme | Template to make your own color scheme (You can send it to me too)

Installing using Package Control

1) If you haven't, install Package Control.

2) Open Package Control: Install Package in the command palette, and search for MKB. Install it, and you might need to restart sublime.

3) Change the language from Plain Text to MKB as your language. You can do this by selecting it at the bottom right corner menu. Sometimes you need to show your status bar (View/Show Status Bar). Alternative, you can right click the screen, click MKB > MKB Language

4) You can also click MKB > Package Settings, and personalize the package eg color scheme, indentation and many other

5) Enjoy! If there's anything wrong ask in #•help

Manual installation

1) Install Sublime Text

2) Install Package Dev

3) Download/clone the repository from https://github.com/KeeMeng/MKB-Syntax-Highlighting

4) Add the custom colors from MKB.sublime-color-scheme, into Tools > Packages > Package Development > Edit Current Color Scheme... Paste the entire json contents into the Right Side of the color scheme, the top of the file should say “THEME.sublime-color-scheme — USER”. Read this website for more details.

5) Put all the files from the repository into a MKB folder Path for Mac: /Users/NAME/Library/Application Support/Sublime Text 3/Packages/MKB Path for windows: C:\Users\%USERNAME%\AppData\Roaming\Sublime Text 3\Packages\[MKB Folder here]

6) Change the language from Plain Text to MKB as your language. You can do this by selecting it at the bottom right corner menu. Sometimes you need to show your status bar (View/Show Status Bar)

7) Go to the top menu, and click MKB/Package Settings, and personalize the package!

8) Select MKB as you language by clicking the bottom right box (If it doesn't show go view > show status bar)

9) Enjoy! If there's anything wrong ask in #•help


  • When opening a .txt file (can be configured), and the first line is $${, it will automatically change to MKB syntax. But if it doesnt work, then you can go to the bottom right corner, and change Plain Text to MKB syntax. After that, the colors should appear automatically, along with the auto complete functions.
  • To auto complete a statement, the auto complete menu should automatically appear. Press arrow key up or down to scroll through, press enter to auto complete. Then, press tab and jump to the next parameters.
  • Or press CMD/CTRL + Space to see a list of the possible auto completions.
  • You can also press CTRL + SHIFT + Space to open the inbuilt wiki.
  • To indent your code, you can mess with the settings (Indent when you save, or prompt before it indents). Or, if you want to manually indent, right click the screen and press MKB indent.
  • By default, when you hover over a keyword, you will see a popup with information. To manually show the hint, you can press MKB Hint when you right click. Scroll down for examples, or click “Open Wiki” to open the wiki page on your browser (Can be specified).
  • Right click anywhere for some actions, or go to to Edit > MKB in the top main menu.
  • You can also change the color scheme in MKB > Package Settings, as well as other cool settings
  • If you want to make your own color scheme, follow the steps in MKB > Color Scheme

How does it work?

  • The new sublime syntax will recognize the actions, variables, parameters, iterators and many more keywords of the Macro/Keybind Mod (Also the modules from https://spthiel.github.io/Modules + a few others), using regex statements it assigns a scope to the different parts of your script. The scope is then assigned a color in the color scheme file, and then you get custom syntax highlighting! The default scope is source.mkb.
  • The completions file will help you auto complete statements, also showing basic help for the statement when you press tab. This uses the snippet function of sublime text.
  • The popup uses sublime's API and gorlem's API to find the information for the popup.
  • The indenter reads each line, and will automatically put tabs in front of the lines. Fancy indent adds a delay between indenting the lines, to make it look like a wave.
  • The linter reads each line and checks if theres an even number of %% () "" []
  • The variable inserter finds all variables from the script


- Which color scheme to use

- Whether or not for the auto complete to be in uppercase

- What character to use as the whitespace for the buffer

- Whether or not indentation should expand compressed lines

- Whether or not to end lines with semicolon ;

- Whether or not to indent script between $${ and }$$

- Whether or not to automatically indent after saving the file

- Whether or not to prompt a message before indenting, only if enable_indent is on

- Whether or not to use fancy indenting. Put “null” for normal indenting, or put a number representing the delay in ms

- Whether or not to show a message telling you indenting finished

- Whether or not to show hints automatically

- Number of lines to show in the pop up, put a big number to show everything

- Whether or not to indent code after linting code

- Whether or not to show a message after linting code

- Whether or not to auto lint code after editing

- Whether or not to show a message after minifying code

- Which browser to use to open the wiki


MKBdocs.css: Is a css file to make https://beta.mkb.gorlem.ml/docs/actions have a dark mode. You can use a chrome extension called stylus to change the css.


If there are any bugs, please tell me, or report it in GitHub. My discord is TKM#6228. If there are any suggestions, please tell me too! Join https://discord.gg/m9yfJtb for support/suggestions/bugs.

Example of the syntax highlighter and the auto complete: Example

Credits to:

Useful links