Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Sublime Text 3 and indentation
Started by Mike_Piercy Feb 18 2017 01:09 PM

13 replies to this topic
sublime text lua indent
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Mike_Piercy

[GLOBAL: userInfoPane.html]
Mike_Piercy
  • Observer

  • 19 posts
  • Corona SDK

Ok, this is driving me crazy. I cannot get this indentation to work for me at all. I've tried all of the instructions both here:

https://forums.coronalabs.com/topic/44079-indentation-issue/

and here:

http://blog.lotech.org/2013/04/fixing-lua-indenting-in-sublime-text.html

but the below block does not indent correctly at all.

 

Using Edit > Line > Reindent on this block:

onEvent = function(event)
if event.phase == "ended" then
--Do Something
end
end

Results in:

onEvent = function(event)
  if event.phase == "ended" then
  --Do Something
end
end

I've tried uninstalling and reinstalling but no luck. I'm running on Windows 10.

 

Am I missing something obvious?

 

 



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 21,849 posts
  • Corona Staff

Do you have the Corona Editor add-on installed?

 

Rob



[TOPIC: post.html]
#3

Mike_Piercy

[GLOBAL: userInfoPane.html]
Mike_Piercy
  • Observer

  • 19 posts
  • Corona SDK

Hi Rob. Yes, I have Corona Editor installed. Do you think that's the problem here?

Eitherway, ST has an abundance of other issues that are very frustrating. I have started to explore Atom as an alternative and already like what I see.

[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 21,849 posts
  • Corona Staff

Corona Editor if anything should make Sublime's indention better.  You can't go wrong with Atom.

 

Rob



[TOPIC: post.html]
#5

Sphere Game Studios

[GLOBAL: userInfoPane.html]
Sphere Game Studios
  • Corona Geek

  • 1,254 posts
  • Corona SDK

I use sublime and it does have minor issues with indentation...nothing that can't be fixed with a simple tab


  • ingemar_cl likes this

[TOPIC: post.html]
#6

yvandotet

[GLOBAL: userInfoPane.html]
yvandotet
  • Contributor

  • 124 posts
  • Corona SDK

Which is the best ? Sublime 3 or Atom ?



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 21,849 posts
  • Corona Staff

I'm a Sublime fan myself. I've not used Atom that much but a lot of people like it.

 

Rob



[TOPIC: post.html]
#8

ingemar_cl

[GLOBAL: userInfoPane.html]
ingemar_cl
  • Contributor

  • 660 posts
  • Corona Staff

I use Sublime 3.

...and I'm old-school. I do manual indentations  :ph34r:



[TOPIC: post.html]
#9

yvandotet

[GLOBAL: userInfoPane.html]
yvandotet
  • Contributor

  • 124 posts
  • Corona SDK

With sublime when I write " physics.addBody( " I have an autoComplete "  physics.addBody( body, [bodyType], options )" but there are no auto-fill completion like "  physics.addBody( body, [static, dynamic,kinematic], {bounce=0, friction=0, ...})".

 

How can I have this ?

Thanks .



[TOPIC: post.html]
#10

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 21,849 posts
  • Corona Staff

Our Corona plugin doesn't support that. Please visit http://feedback.coronalabs.com and put in a feature request for it, with that example and lets get it voted up. It would probably be an engineering challenge to make happen, but until it gets on our radar with some votes, it will be hard to get it implemented.

 

Rob



[TOPIC: post.html]
#11

yvandotet

[GLOBAL: userInfoPane.html]
yvandotet
  • Contributor

  • 124 posts
  • Corona SDK

But I have seen in many videos tutorials on Youtube people that just press the " tab button " with " physics.addBody " and then display all the feature ( feature, bounce, etc... ) in once.



[TOPIC: post.html]
#12

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 21,849 posts
  • Corona Staff

Do you have a link to one of those URLs?



[TOPIC: post.html]
#13

yvandotet

[GLOBAL: userInfoPane.html]
yvandotet
  • Contributor

  • 124 posts
  • Corona SDK

This video : between 10 min 45 sec and 11 min.

 

 

He just type physics.addBody and then all the parameter comes with this after .



[TOPIC: post.html]
#14

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 21,849 posts
  • Corona Staff

Let me ask some questions. 

 

I'm speculating that our Corona Editor plugin is using our documentation as a source for the syntax highlighting and at the time since that video was produced in 2013, we've updated our documentation to use a more presentable syntax to readers and we don't list all the options in every parameter any more. 

 

Rob




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: sublime text, lua, indent