Upgrade NotePad++?
-
I always use NotePad++.
You probably noticed I often use stuff likeentities.each{|e|...}
: I hadn't appreciated that {...} were so difficult to type on some non-English keyboard layouts ! -
And oddly Martin has not even come by to see if my fix worked for him....I guess he's away from his keyboard this afternoon (or evening or whatever).
Chris
-
@chris fullmer said:
I guess [Martin]'s away from his keyboard this afternoon (or evening or whatever).Chris
Mornings are my thing.
I'm doing the tutorial.
for e in entities do ... end
strikes me as a lot more beginner-friendly thanentities.each { |e| ... }
. Guess I'll have to try some editors.There's an old saying, something like: "An editor a day keeps the productivity away."
-
But I think your usage of "
do
" might be incorrect syntax in any ruby editor. It looks like thedo
should not be included with thefor
loop.http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_expressions.html#UK
Chris
-
hm.. it does look like the
do
is redundant infor ... in
syntax... But Ruby doesn't throw any errors... -
Tried SciTE. Excellent text editor. High marks for ".properties" files, one per language, that make it easy to customize.
Downside: exact same bug as NotePad++.
The two forms of
for/in
that load without errors are:for x in foo do ... end for x in foo # no do ... end
-
That's odd because NPP and Scite (as well as many others) are based in the same editor core Scintilla.
-
Odd? They both use Scintilla and both have the same syntax issues?
-
Oh sorry - I mis-read Martin's post.
-
I guess I would recommend using it without the do, since ruby syntaxd seems to think its redundant (which I do find odd as it does not fit their other loop syntaxes).
Or if it helps, I learned the
array.each do |e| ... end
method first and I was able to understand it fairly quickly. And I hve zero programming experience outside of Ruby for Sketchup.Another bonus to teaching that method is that all the API uses it, as apposed to the
for in end
loop. So it might help readers transition into the API smoother. But that is just a thought,Chris
Advertisement