Jump to content




CC Syntax Highlighting/Code Completions v1.2 - Sublime Text 2

utility lua

  • You cannot reply to this topic
133 replies to this topic

#41 darkroom

  • Members
  • 70 posts

Posted 22 February 2013 - 11:43 AM

Oh my god.... Gravity I love you more than anyone in the world right now i am making a huge project right now and this is amazing

#42 Jan

  • Members
  • 141 posts
  • Locationthe Netherlands

Posted 05 March 2013 - 04:47 AM

It doesnt work for me, after I installed it, the code snippets were avaible, but not the APIs :(
I set the syntax to ComputerCraft
I tried CTRL+space but it didnt want to autocomplete.
my Sublime Text version is 2.0.1

#43 LancerX

  • Members
  • 10 posts

Posted 05 March 2013 - 05:54 AM

This is really great! I use Sublime for a lot of my projects and love having CC support.

A couple of additional things I do in my workflow: I added a simple build script that copies my source files to a CC computer directory for one button deploy. I also have file based logging/debugging and keep the log open in a Sublime tab (usually it's own window).

#44 MudkipTheEpic

  • Members
  • 639 posts
  • LocationWhere you'd least expect it.

Posted 08 March 2013 - 03:07 AM

Bug: Does not re-indent at:

foobar = function()


#45 sjele

  • Members
  • 334 posts
  • LocationSomewhere on the planet called earth

Posted 08 March 2013 - 03:55 AM

Allways used np++, then said to my selfs when i saw this: Gotta try sub lime text 2 out, loved from the first moment. Thanks :)

#46 Tiin57

    Java Lunatic

  • Members
  • 1,412 posts
  • LocationIndiana, United States

Posted 08 March 2013 - 06:14 AM

Could you add some mirrors? I can't download from Mega @ school (what a surprise :/)

#47 Jan

  • Members
  • 141 posts
  • Locationthe Netherlands

Posted 08 March 2013 - 07:22 AM

View PostJan, on 05 March 2013 - 04:47 AM, said:

It doesnt work for me, after I installed it, the code snippets were avaible, but not the APIs :(
I set the syntax to ComputerCraft
I tried CTRL+space but it didnt want to autocomplete.
my Sublime Text version is 2.0.1
I still havent figured out how to fix code completions, maybe it is because I downloaded version 1.1
Does anyone have a link to the old version?

#48 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 08 March 2013 - 08:11 PM

Got another bug for you grav.

some functions only highlight when a ( is present after the name. this causes problems when doing this

print"Hello World!"


#49 3ydney

  • Members
  • 53 posts
  • LocationAdelaide, Australia.

Posted 09 March 2013 - 01:16 AM

Nice!

#50 ChrisJay

  • Members
  • 3 posts

Posted 09 March 2013 - 12:29 PM

The file "completions.sublime-completions" is missing a few commas at the end of line 29,31 and 32. Also, the API functions aren't working in autocomplete either. I'm using ST2.0.1 as well.

#51 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 09 March 2013 - 09:22 PM

View PostGravityScore, on 20 February 2013 - 01:59 AM, said:

- TheOriginalBIT for tonnes of suggestions
Here is another....

fix colours.gray ... colors.grey ...

at the moment
colours.grey and colors.gray will highlight even though they are invalid.

#52 Jan

  • Members
  • 141 posts
  • Locationthe Netherlands

Posted 09 March 2013 - 10:36 PM

View PostChrisJay, on 09 March 2013 - 12:29 PM, said:

The file "completions.sublime-completions" is missing a few commas at the end of line 29,31 and 32. Also, the API functions aren't working in autocomplete either. I'm using ST2.0.1 as well.
Oh ok good to hear I am not the only one having this problem. I'll try to add the missing commas

#53 GravityScore

  • Members
  • 796 posts
  • LocationLand of Meh

Posted 10 March 2013 - 03:00 AM

View PostTheOriginalBIT, on 09 March 2013 - 09:22 PM, said:

Here is another....

fix colours.gray ... colors.grey ...

at the moment
colours.grey and colors.gray will highlight even though they are invalid.
Fixed

View PostTheOriginalBIT, on 08 March 2013 - 08:11 PM, said:

Got another bug for you grav.

some functions only highlight when a ( is present after the name. this causes problems when doing this

print"Hello World!"
Fixed.

View PostMudkipTheEpic, on 08 March 2013 - 03:07 AM, said:

Bug: Does not re-indent at:

foobar = function()
Couldn't find out how to fix :/
I'll look deeper into it...

View PostChrisJay, on 09 March 2013 - 12:29 PM, said:

The file "completions.sublime-completions" is missing a few commas at the end of line 29,31 and 32. Also, the API functions aren't working in autocomplete either. I'm using ST2.0.1 as well.
Fixed it! It was due to the missing commas....

Uploading now, with a mirror for you tiin :P

#54 ChrisJay

  • Members
  • 3 posts

Posted 11 March 2013 - 05:34 AM

View PostGravityScore, on 10 March 2013 - 03:00 AM, said:

View PostChrisJay, on 09 March 2013 - 12:29 PM, said:

The file "completions.sublime-completions" is missing a few commas at the end of line 29,31 and 32. Also, the API functions aren't working in autocomplete either. I'm using ST2.0.1 as well.
Fixed it! It was due to the missing commas....

But shouldn't there be a suggestion for, e.g. turtle.dig(), turtle.moveUp(), etc.?

Posted Image

#55 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 11 March 2013 - 11:46 AM

Iirc they weren't in the completions file. Also Sublime Text 2 ISN'T an IDE it's a text editor. If you want all these special features you are going to have to use an IDE, like Eclipse.

#56 ChrisJay

  • Members
  • 3 posts

Posted 11 March 2013 - 12:00 PM

View PostTheOriginalBIT, on 11 March 2013 - 11:46 AM, said:

Iirc they weren't in the completions file. Also Sublime Text 2 ISN'T an IDE it's a text editor. If you want all these special features you are going to have to use an IDE, like Eclipse.

Well, they are present in the language file, and they are beeing highlighted. So I just thought it would make sense to also suggest these function in the autocomplete. ;)

Anyway, I created a small list with the CC core functions. It dosn't really support namespaces, but I'm looking into that.

Spoiler


#57 MudkipTheEpic

  • Members
  • 639 posts
  • LocationWhere you'd least expect it.

Posted 24 March 2013 - 11:54 AM

Elseifs seem to be broken again!

#58 GravityScore

  • Members
  • 796 posts
  • LocationLand of Meh

Posted 24 March 2013 - 02:54 PM

View PostMudkipTheEpic, on 24 March 2013 - 11:54 AM, said:

Elseifs seem to be broken again!
Fixed in a new version I'll release in a minute!

View PostChrisJay, on 11 March 2013 - 12:00 PM, said:

Anyway, I created a small list with the CC core functions. It dosn't really support namespaces, but I'm looking into that.

THANK YOU!! :D That list was very helpful. I just used a bit of regex and turned all of them into proper triggers, and now we have completions for all main CC functions! Coming in the soon-to-be-released version!

EDIT: Also fixed the bug where functions defined like:
a = function(hello)
  print(hello)
end
Wouldn't indent properly when using re-indent, or just when typing them :D

EDIT 2: Version 1.2 released!

#59 superaxander

  • Members
  • 609 posts
  • LocationHolland

Posted 24 March 2013 - 07:34 PM

Wooh

#60 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 24 March 2013 - 07:39 PM

View PostGravityScore, on 24 March 2013 - 02:54 PM, said:

EDIT: Also fixed the bug where functions defined like:
a = function(hello)
  print(hello)
end
Wouldn't indent properly when using re-indent, or just when typing them :D
FINALLY! :D
can you fix the bad indenting with
if <some-condition> then <do something> end
  <next-instruction-is-indented>

EDIT: Really the problem is just, anything that has an end on the same line its declared indents the next line.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users