w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
sublime text customize syntax highlighting

You can try this:

  1. First open the file Lua.tmLanguage located in Packages/Lua
  2. Find the <dict> entry containing <string>(and|or|not)</string>
  3. Change the the key of that entry to keyword.control.lua.

That way the and, or and not keywords should be rendered with same color as if, else, etc.

Here is the complete dict entry after modification:


However this does have some drawbacks, for example this change can be overwritten when you update Sublime Text. I tested it very briefly so there might be some side effects. Try it and let me know in the comments if it works for you.

PS: I tested this on Sublime Text 2, hopefully it will work the same way on Sublime Text 3

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.