published 2014-03-03
I have finally decided to configure Sublime Text 2 to have it autocomplete Lua code the way I want it to.
For instance, by default, when you start typing function
and hit TAB, you get the following result:
function function_name( ... ) -- body end
Instead I wanted this:
function(self) error("unimplemented") end
It turns out this is very simple. Go to Preferences -> Browse Packages...
and open the Lua directory. There are several files there, including two named function-(fun).sublime-snippet and function-(function).sublime-snippet which do almost the same thing.
Remove the first one and open the second one in a text editor. Its content should be something like:
function source.lua function
Replace it by:
function source.lua function
... and that is all, the deed is done!
text/gemini;lang=en_US
This content has been proxied by September (ba2dc).