Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation is fixed to 1 space in all snippets #16

Open
hsandt opened this issue Aug 4, 2020 · 0 comments
Open

Indentation is fixed to 1 space in all snippets #16

hsandt opened this issue Aug 4, 2020 · 0 comments

Comments

@hsandt
Copy link
Contributor

hsandt commented Aug 4, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant