Skip to content

Indentation is fixed to 1 space in all snippets #16

@hsandt

Description

@hsandt

All snippets used fixed indents of 1. This is common in PICO-8 (to reduce character count), but some programmers may prefer indentations of 2 or 4 spaces (esp. if using Lua minifier like me, so they don't care about character count at first).

Sublime Text doc recommended to always insert an actual tab as indent in snippets. The tab would then be expanded to a tab, or spaces with the right amount, depending on the file's current settings.

So, I suggest replacing all 1-space indents with tabs. Programmers used to 1-space indents will still be able to insert them, provided their file is set to Indent: 1 space. While others will be able to indent with whatever they prefer.

Ex:

<snippet>
	<content><![CDATA[
function ${1:foo}(${2:var})
 ${3:-- do something}
end
]]></content>
	<tabTrigger>func</tabTrigger>
	<scope>source.p8</scope>
	<description>function</description>
</snippet>

would become

<snippet>
	<content><![CDATA[
function ${1:foo}(${2:var})
	${3:-- do something}
end
]]></content>
	<tabTrigger>func</tabTrigger>
	<scope>source.p8</scope>
	<description>function</description>
</snippet>

The invisible space before ${3 above is an actual tab.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions