Notepad++
-
http://notepad-plus.sourceforge.net/uk/site.htm
Is what I use to write Ruby Script - it's a great 'free'ware text editor...
Has several useful plugins too... -
I practically use it for everything when not a formatted *.doc file is needed. I can just suggest it to everyone.
-
For this you will need last version of Notepad++ or if you use a older version, download NppExec plugin from http://notepad-plus.sourceforge.net/uk/site.htm (last version have this integrated).
Then you will need TBD's SketchUp Bridge from here http://labs.plugins.ro/.How to do it:
-
Install Notepad++ (and add NppExec plugin)
-
Add bridge.so, bridge_load.rb and SUB.exe to SketchUp plugins directory.
-
Open SketchUp and Notepad++
-
In Notepad++ press F6 or navigate to Plugins --> NppExec --> Execute... and write in Command(s) window the full path to SUB.exe followed by Npp environment variable pointing to current file's path: "$(FULL_CURRENT_PATH)".
example: C:\Program Files\Google\Google SketchUp 6\Plugins\SUB.exe "$(FULL_CURRENT_PATH)"
There are several environment variables that can be used depending on what you want to do. See Npp documentation. I also use this variable to run in Notepad++ console other rubies using stand-alone ruby interpreter. I do that like this:
ruby "$(FULL_CURRENT_PATH)"
See the slideshow attached ! SlideShow made with FastStone viewer. Is an exe file with browse function(move the mouse on top of the screen). Navigate with the arrow keys.
-
-
NewOne: nice HowTo, but... what does it do..?
-
loads a script in SU straight from notepad++ (see the title of the post.)
-
@remus said:
loads a script in SU straight from notepad++ (see the title of the post.)
Doh! Never occurred to me that each reply had a unique title...
-
Yeah, its almost always kept the same, can get rather confusing when things start changing half way through a thread.
-
@remus said:
Yeah, its almost always kept the same, can get rather confusing when things start changing half way through a thread.
Sorry! I put this here to be in "Notepad++" discussion.
-
Wasnt really meant as a criticism, more a general point. Cool to see people improving the ruby scripting workflow, though
-
@remus said:
Yeah, its almost always kept the same, can get rather confusing when things start changing half way through a thread.
No,it won't change the topic title in the topic list - only that particular post (within the topic) will have the different title. Did you know however that every post has its own URL? You can easily link to any like this:
http://www.sketchucation.com/forums/scf/viewtopic.php?f=169&t=6903&p137855#p137855 -
I'm new to both notepad++ and Ruby.
Notepad++ in Settings>Backup/AutoCompletion allows you to choose
"Function parameters hint on input". I checked this box but don't see
any results when I'm writing a program. Anyone have experience with
this? Does it require another file like the autocompletion does? -
@huckrorick said:
I'm new to both notepad++ and Ruby.
Notepad++ in Settings>Backup/AutoCompletion allows you to choose "Function parameters hint on input". I checked this box but don't see any results when I'm writing a program.
(I checked into this...) The API file is not set up to do function parameters.@huckrorick said:
Does it require another file like the autocompletion does?
No. Same file, just extra nested XML tags. Alot of work.
And it may not work well with ruby. The 'feature' was designed for a 'functional' language like C, where mostly a function always has the same return type, and the same number of arguments. Ruby can be variable in both respects. -
Hi Dan,
If I remember correctly you were going to start using Notepad++ (but hadn't used it yet). Did you start? Do you have the file for autocompletion? (I think there are more than one around.) The one I have is useful but seems to miss a few things, oddly enough "def" is one of them.
Huck
-
@huckrorick said:
If I remember correctly you were going to start using Notepad++ (but hadn't used it yet). Did you start?
Yes.. I've been using it for the past 2 days.
Much easier to change settings (colors, etc.) using the dialogs, then those 'properties' files that SciTE uses!@huckrorick said:
Do you have the file for autocompletion? (I think there are more than one around.)
Yes.. I've found that the file made by radhikari has more entries in it.Altho... I think I would have done it differently. For instance many method names have '(UI::Toolbar)' [ie, the qualification after them], which gets pasted in, and you then have to backspace over it, as it doesn't belong there.
I'll have to find time, to play around with the API file sometime.
ALSO... the file(s) were just modified FULL ruby files. Many of the listed modules and classes (and their methods,) are for Full Ruby, and are not available to Sketchup Ruby (unless a user has a full ruby install AND has paths to the full Ruby folders set.)
-
Another difference betwen the two editors.
I belive SciTE lets you execute scripts from the editor without saving them.
Notepad++ won't execute the script unless it's saved first. (I get an file 'such-n-such.rb' not found error.)
-
I didn't know you could execute a file directly from Notepad++. The way I've been doing it is:
- save the file
- go to Ruby Console in Skectchup and "load" the file (not too hard because the load command is saved and you can execute it again each time you modify the file"
did you discover a more direct way to do it?
Huck
-
@huckrorick said:
I didn't know you could execute a file directly from Notepad++. The way ...[snip]... did you discover a more direct way to do it?
NewOne explains how to do it, on page 1 of this thread, here's the direct link:
http://forums.sketchucation.com/viewtopic.php?f=169&t=6903&st=0&sk=t&sd=a#p137855You need to install the NPPEXEC extension first. It helps if you have the PluginManager extension installed.
Plugins > PluginsManager > show...
Available (tab) > Hilite NPPEXEC and click 'Install' (button) -
@newone said:
For this you will need last version of Notepad++ or if you use a older version, download NppExec plugin from http://notepad-plus.sourceforge.net/uk/site.htm (last version have this integrated).
Then you will need TBD's SketchUp Bridge from here http://labs.plugins.ro/.Hey there!
Please let me unbury this thread to say first that I really appreciate it and like to thank every people that participate (especially the author of the post above). It is very important to have the right tools when you code, and find such info quickly to avoid to loose to much time
So : thx !!And: TDB, is there a way to get your plugin transmitting compilation info (such as error line number) to NPP? Does anybody know?
-
What should I use for mac?
-
Advertisement