Quick tip for anyone using sublimetext

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Quick tip for anyone using sublimetext

Re: Quick tip for anyone using sublimetext

by Cerberus » 28 May 2018, 17:43

swagfag wrote:i think the original incorrectly considered the following a function definition:

Code: Select all

if(something){
	; whatever
}
Ahh, I see, yes, that's it! I probably never noticed because I always use spaces. I've added it to my .sublime-syntax file.

Re: Quick tip for anyone using sublimetext

by swagfag » 28 May 2018, 17:04

i think the original incorrectly considered the following a function definition:

Code: Select all

if(something){
	; whatever
}

Re: Quick tip for anyone using sublimetext

by Cerberus » 28 May 2018, 16:45

KuroiLight wrote:Not sure if this should go in this section or another, but it pertains to writing AHK code using the available plugin in sublime_text.

Heres a quick fix a highlighting issue that occurs when writing in OneTrueBrace style with if statements
the issue is with this line (78) in the tmLanguage file: https://github.com/ahkscript/SublimeAut ... nguage#L78
just change the regex to ^\s*((?!\bif\b)\w+)(\()(.*)(\))\s*({)\s*(;?.*)$
This issue can still occur with other statements unless its expanded for those too. but it was most commonly annoying on if statements.

:salute:
Hmm could you explain what this changes? I've edited my own version, so I don't really remember what it used to be and how that looked. My regex version is even shorter than the one on Github, even though I'm sure I installed the package after the latest Github version.

Re: Quick tip for anyone using sublimetext

by nnnik » 11 Mar 2018, 12:06

It seems we missed this after adding the Editors section.
I moved it to the correct section now.

Re: Quick tip for anyone using sublimetext

by BoBo » 23 Sep 2017, 02:42

KuroiLight wrote:Not sure if this should go in this section or another, but it pertains to writing AHK code using the available plugin in sublime_text.

Heres a quick fix a highlighting issue that occurs when writing in OneTrueBrace style with if statements
the issue is with this line (78) in the tmLanguage file: https://github.com/ahkscript/SublimeAut ... nguage#L78
just change the regex to ^\s*((?!\bif\b)\w+)(\()(.*)(\))\s*({)\s*(;?.*)$
This issue can still occur with other statements unless its expanded for those too. but it was most commonly annoying on if statements.

:salute:
:thumbup:

Quick tip for anyone using sublimetext

by KuroiLight » 21 Sep 2017, 02:18

Not sure if this should go in this section or another, but it pertains to writing AHK code using the available plugin in sublime_text.

Heres a quick fix a highlighting issue that occurs when writing in OneTrueBrace style with if statements
the issue is with this line (78) in the tmLanguage file: https://github.com/ahkscript/SublimeAut ... nguage#L78
just change the regex to ^\s*((?!\bif\b)\w+)(\()(.*)(\))\s*({)\s*(;?.*)$
This issue can still occur with other statements unless its expanded for those too. but it was most commonly annoying on if statements.

:salute:

Top