| Author | 
Message | 
 
vadimred13
 
 
  Joined: Mar 09, 2009 Posts: 17 Location: Albany, NY
  | 
 Posted: Tue Mar 10, 2009 7:27 am    Post subject:
Notepad++ Syntax Highlighter | 
       | 
 
 
  | 
 
I've configured a ChucK syntax highlighter for Notepad++:
 
 
Download
 
 
To use - download the XML to your Notepad++ Application Data folder.  For windows, this is C:\Documents and Settings\<user>\Application Data\Notepad++
 
If you already have a custom language definition in Notepad++, you're gonna have to do some XML merging (fun stuff).  Enjoy! | 
 
  | 
| 
Back to top
 | 
 | 
 
  | 
 
Kassen
 
Janitor
  
  
  Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL 
G2 patch files: 3
  | 
 Posted: Tue Mar 10, 2009 10:48 am    Post subject:
 | 
       | 
 
 
  | 
 
Great! I have a NP++ setup that works but I was -so far- unable to get it out of there. I'll try yours as well.
 
 
Lovely first post, welcome on board! _________________ Kassen | 
 
  | 
| 
Back to top
 | 
 | 
 
  | 
 
vadimred13
 
 
  Joined: Mar 09, 2009 Posts: 17 Location: Albany, NY
  | 
 Posted: Wed Mar 11, 2009 9:08 pm    Post subject:
Updated | 
       | 
 
 
  | 
 
I've configured AutoComplete functionality for Notepad++.
 
 
Download
 
 
Copy this XML file into your APIs folder in your Notepad++ install directory.  For Windows, this is: C:\Program Files\Notepad++\plugins\APIs
 
Make sure that you have AutoComplete enabled in your Notepad++ preferences.
 
 
I've also updated the syntax highlighter (from the first post) to also highlight functions in the Std, Math, and Machine libraries. | 
 
  | 
| 
Back to top
 | 
 | 
 
  | 
 
Kassen
 
Janitor
  
  
  Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL 
G2 patch files: 3
  | 
 Posted: Thu Mar 12, 2009 7:07 am    Post subject:
 | 
       | 
 
 
  | 
 
That's really nice! Did you find a way to have keyboard shortcuts for running ChucK from NP++ as well? _________________ Kassen | 
 
  | 
| 
Back to top
 | 
 | 
 
  | 
 
vadimred13
 
 
  Joined: Mar 09, 2009 Posts: 17 Location: Albany, NY
  | 
 Posted: Thu Mar 12, 2009 11:35 am    Post subject:
Running ChucK from Notepad++ | 
       | 
 
 
  | 
 
Well, since you ask - yes.  Copy this batch file to your drive:
 
 
Download
 
 
Then edit it to point to your chuck.exe.  In Notepad++, navigate to Run, Run... (or hit F5) to bring up the Run... dialog.  Once there, paste this command in there: 
 
 
"location_of_where_you_saved_the_above_script" "$(CURRENT_DIRECTORY)" "$(FILE_NAME)"
 
 
From there, if you click Save, you can bind this command to a key/key combination.  
 
 
So, for me the command is:
 
 
"C:\ChucK\runChucK.bat" "$(CURRENT_DIRECTORY)" "$(FILE_NAME)"
 
 
because my runChucK script lives in C:\ChucK
 
 
It actually shouldn't be too difficult to set up some kind of script/macro, or even write a little launcher program to be able to add/remove/replace shreds on the virtual machine from within Notepad++, but I'm at work right now, so I'll work on that when I get home.  It definitely would be useful...at least until the new version of miniAudicle comes out...if it ever does   
 
 
Cheers | 
 
  | 
| 
Back to top
 | 
 | 
 
  | 
 
Kassen
 
Janitor
  
  
  Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL 
G2 patch files: 3
  | 
 Posted: Thu Mar 12, 2009 12:15 pm    Post subject:
Re: Running ChucK from Notepad++ | 
       | 
 
 
  | 
 
 	  | vadimred13 wrote: | 	 		  
 
It actually shouldn't be too difficult to set up some kind of script/macro, or even write a little launcher program to be able to add/remove/replace shreds on the virtual machine from within Notepad++, but I'm at work right now, so I'll work on that when I get home.  It definitely would be useful...at least until the new version of miniAudicle comes out...if it ever does   
 
 | 	  
 
 
Way cool. _________________ Kassen | 
 
  | 
| 
Back to top
 | 
 | 
 
  | 
 
Kassen
 
Janitor
  
  
  Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL 
G2 patch files: 3
  | 
 Posted: Mon Apr 20, 2009 10:23 am    Post subject:
 | 
       | 
 
 
  | 
 
Finally got round to playing with these.
 
 
Some issues; In your language highlight settings the "folder" operators never seem to mark the end of the folding block. I use "{" and "}" for those and that way it works for me. Does this work for you?
 
 
Also; I can't get the auto completion to work right; it will recognise words I used elsewhere in the code and offer those as well as some that seem to come from some other language but not "SinOsc" and so on. Any idea on what I might've done wrong there? _________________ Kassen | 
 
  | 
| 
Back to top
 | 
 | 
 
  | 
 
vadimred13
 
 
  Joined: Mar 09, 2009 Posts: 17 Location: Albany, NY
  | 
 Posted: Mon Apr 20, 2009 11:25 am    Post subject:
 | 
       | 
 
 
  | 
 
Unfortunately, when it comes to code folding, Notepad++ makes you choose one of 2 solutions.  Either enable code folding, but give up that lovely brace matching/highlighting functionality, or the other way around.  As long as you specify '{' and '}' as activated operators - code folding will not happen.  If you unspecify them, and add them to the folding open and close symbols - folding will happen (at the cost of matching braces).  I chose to give up folding, because I'd rather have the matching braces.  Let me know if you get both folding and brace matching working...
 
 
As for the auto-completiong not working - make sure that in your autocomplete settings, you have Function completion selected (not word completion).  In my settings, I checked the Enable Auto-Completion on each input and the Function parameters hint on input checkboxes, and selected the Function completion radio button
 
 
Let me know if that doesn't do it for you.
 
 
-Vadim | 
 
  | 
| 
Back to top
 | 
 | 
 
  | 
 
Kassen
 
Janitor
  
  
  Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL 
G2 patch files: 3
  | 
 Posted: Tue Apr 21, 2009 4:38 am    Post subject:
 | 
       | 
 
 
  | 
 
 	  | vadimred13 wrote: | 	 		  | Unfortunately, when it comes to code folding, Notepad++ makes you choose one of 2 solutions. | 	  
 
 
Yes, I think you are right. I don't see why it needs to be that "either/or". Anyway, I like folding better than brace matching, I think. Sometimes I make it fold and find the missing/extra brace based on that.
 
 
 	  | Quote: | 	 		  
 
As for the auto-completiong not working - make sure that in your autocomplete settings, you have Function completion selected (not word completion).  In my settings, I checked the Enable Auto-Completion on each input and the Function parameters hint on input checkboxes, and selected the Function completion radio button
 
 | 	  
 
 
It works now, I had to update NP++; my version was quite old already, I had no idea there were that many updates to it, it looked quite mature to me.
 
 
BTW, what is your word-list based on? I think it lists a few things, like "super" and "implements" that I don't think are used in ChucK. _________________ Kassen | 
 
  | 
| 
Back to top
 | 
 | 
 
  | 
 
vadimred13
 
 
  Joined: Mar 09, 2009 Posts: 17 Location: Albany, NY
  | 
 Posted: Tue Apr 21, 2009 11:00 am    Post subject:
 | 
       | 
 
 
  | 
 
It's based on the reserved keywords from the ChucK language spec.
 
 
No, they don't do anything yet, but I'm guessing that they are reserved for possible future use. | 
 
  | 
| 
Back to top
 | 
 | 
 
  | 
 
Kassen
 
Janitor
  
  
  Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL 
G2 patch files: 3
  | 
 Posted: Tue Apr 21, 2009 11:10 am    Post subject:
 | 
       | 
 
 
  | 
 
Ah, yes.
 
 
Yeah, the development of the whole class system was always on The List behind garbage collection and GC took a bit longer to arrive than anyone thought. It seems quite tricky. _________________ Kassen | 
 
  | 
| 
Back to top
 | 
 | 
 
  | 
 
 |