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
Add a snippet for EditorConfig file content #50
Changes from 7 commits
d2b8acb
8bed168
1ec23fe
97e610d
e5d911f
3e8daa9
28b223c
9288d3c
fb861db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
root = true | ||
|
||
[*] | ||
${1/(^$)|.*/?1:# tab | space\n/i}indent_style = ${1:tab}${1/(t$)|(s$)|(ta$)|(sp$)|.*/?1:ab:?2:pace:?3:b:?4:ace/i} | ||
#indent_size = ${2:4} | ||
${3/(^$)|.*/?1:# lf | cr\n/i}end_of_line = ${3:lf}${3/(l$)|(c$)|.*/?1:f:?2:r/i} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently if I write There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For sure! |
||
${4/(^$)|.*/?1:# latin1 | utf-8 | utf-8-bom | utf-16be | utf-16le\n/i}charset = ${4:utf-8}${4/(l$)|(u$)|(la$)|(ut$)|.*/(?1:atin1:)(?2:tf-8:)(?3:tin1:)(?4:f-8)/i} | ||
${5/(^$)|.*/?1:# true | false\n/i}trim_trailing_whitespace = ${5:true}${5/(t$)|(f$)|(tr$)|(fa$)|.*/?1:rue:?2:alse:?3:ue:?4:lse/i} | ||
${6/(^$)|.*/?1:# true | false\n/i}insert_final_newline = ${6:true}${6/(t$)|(f$)|(tr$)|(fa$)|.*/?1:rue:?2:alse:?3:ue:?4:lse/i} | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's remove this one. It's too opinionated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
]]></content> | ||
<tabTrigger>editorconfig</tabTrigger> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should probably set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, in fact I dropped the scope to ease fast creation of editorconfig. The scenario I was thinking was :
I don't know if the initial scope of ST can parameterized by user, that's why I didn't specified the scope. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
</snippet> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if it's possible to uncomment this if it changes from the default value. Seems you can do some transformation on substitution: http://sublimetext.info/docs/en/extensibility/snippets.html#substitutions We could then leave it without a value and if a value is typed it's uncommented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For sure, done! I've used substitutions all the way since you pointed me to this direction earlier, in december ;-).