Editing Sublime Text packages

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!

Proxy Information
Original URL
gemini://separateconcerns.com/2014-03-03-sublime-packages.gmi
Status Code
Success (20)
Meta
text/gemini;lang=en_US
Capsule Response Time
115.158235 milliseconds
Gemini-to-HTML Time
0.543856 milliseconds

This content has been proxied by September (ba2dc).