|
|
#1 | |||
|
Evil Emoticon
Respected User
Project Leader: PoC |
NOTE: You have been redirected in order for our attachments to be made available to you. This will only last two minutes; these measures where taken to avoid hotlinking and bandwidth theft. To avoid these restrictions Log in or Register Hi guys:
Probably there are people asking... what is Notepad++?? well, this program is a very enhanced notepad, with many (but many) interesting functions to edit, and visualize text. Its features are impressive and they can be seen here. This program is free and it can be downloaded here. In the recent versions of this program, they offer the possibility to create a custom Syntax Highlighting and Syntax Folding. After testing and learning about it, I decided to make one for vJASS because I love the highlighting. I think the result is good enough and uses the last JASSHelper syntax, so you will have highlighting for libraries, structs, methods, etc. How to install it??:
Screenshot .:
I hope this can be useful for people new with vJASS. Comments and suggestions are always welcome.
Last edited by moyack : 03-28-2009 at 03:27 AM. |
|||
|
|
|
| Sponsored Links - Login to hide this ad! |
|
|
|
|
#2 |
|
I blink, therefore I am.
Join Date: Sep 2006
Posts: 1,812
![]() ![]() ![]()
|
Sexy! Pluse repo!
Btw, you should include a comment that it requires saving the file as .j or .ai before the settings take effect. Edit: There is an error... (it happens with JassCraft aswell, except notepad wraps the error) using call SetTableReal("(MCS-UC)" , "\"", 0.404) will cause the string highlight to wrap. Last edited by Ammorth : 05-10-2007 at 04:14 AM. |
|
|
|
|
|
#3 |
|
Free Software Terrorist
Technical Director
|
I once dropped notepad++ because it didn't let me pick a different highlighting for //! over //
__________________Also, I thought you needed a plugin for auto complete? Or have they added a way to do it without plugins? Last edited by Vexorian : 05-10-2007 at 04:25 AM. |
|
|
|
|
|
#4 |
|
Evil Emoticon
Respected User
Project Leader: PoC |
No, there is not neccesary to make a plugin for that, they've added the API files, (*.api) where you put in list all the most common functions. In this case I'll do a file called vJASS.API with all the common.j and common.ai function and variable names, and you just have to do CTRL+SPACE to access the list.
Last edited by moyack : 05-10-2007 at 06:05 PM. |
|
|
|
|
|
#5 |
|
User
Join Date: Dec 2006
Posts: 67
|
Awesome.
Can it also correct function capitalization like JassCraft does? (Turns getunitx into GetUnitX upon typing the "(" ) EDIT: found a bug, if you use function in a code callback like in a timer, it creates a [+] fold button. Last edited by 1337D00D : 05-10-2007 at 10:50 PM. |
|
|
|
|
|
#6 |
|
Evil Emoticon
Respected User
Project Leader: PoC |
In theory it doesn't, but I'm planning to add autocompletion functionality by adding a command list, so in some way, you can do what are you asking. Thanks for your comments, I'll see how to fix them.
Last edited by moyack : 05-10-2007 at 11:17 PM. |
|
|
|
|
|
#7 |
|
User
Official Map Reviewer
Join Date: Jan 2006
Posts: 362
![]()
|
Nice, but lacking a few things, in my opinion --
<Keywords name="Words4">debug SCOPE_PREFIX SCOPE_PRIVATE bj_ EVENT_ UNIT_ ITEM_ EFFECT_ SOUND_ CAMERA_ DAMAGE_ ATTACK_ GAME_ MAP_ PLAYER_ RACE_ TEXTMAP_ VERSION_ WEAPON_</Keywords> Replacing "Words4" with that would highlight warcraft's constants as well, what about adding that? (Or making constants have their own highlighting) Also, you forgot 'elseif' in "Words2", and 'not' in "Words1" Finally, what about moving 'interface' to "Folder+" and 'endinterface' to "Folder-"? (though don't do that with methods unless there's a way to tell them not to try to fold when they're in an interface) |
|
|
|
|
|
#8 |
|
Evil Emoticon
Respected User
Project Leader: PoC |
Thanks for your comments :)
@Ammorth: I tried to fix it, but it's impossible, I think we have to live with it :( @PurplePoot: About the Words4 section, I've added those, I think it's a good idea. About interface, I've decided not to add it because you can use in vJASS function interfaces, which bugs with folding. Here's an example about this feature: JASS:function interface Arealfunction takes real x returns real // as you can see, this doesn't fold, but notepad++ will show it // as a fold keyword, closing all the code above that line :P function double takes real x returns real return x*2.0 endfunction function triple takes real x returns real return x*2.0 endfunction function Test1 takes real x, Arealfunction F returns real return F.evaluate(F.evaluate(x)*F.evaluate(x)) endfunction function Test2 takes nothing returns nothing local Arealfunction fun = Arealfunction.double //syntax to get pointer to function call BJDebugMsg( R2S( Test1(1.2, fun) )) call BJDebugMsg( R2S( Test1(1.2, Arealfunction.triple ) )) //also possible... endfunction And the same happens with function and method, when you call a callback code, for instance. Those keywords will have disabled the folding to avoid this kind of issues. Last edited by moyack : 05-12-2007 at 12:46 AM. |
|
|
|
|
|
#9 |
|
Free Software Terrorist
Technical Director
|
you don't get to use method in callback, but it would still mess with interface.
__________________you just get to wish notepad++ was more flexible. |
|
|
|
|
|
#10 | |
|
Evil Emoticon
Respected User
Project Leader: PoC |
Quote:
Updated the file. @Vexorian: Probably this is offtopic, are you going to implement properties get and set?? so I can add it to the highlighter. |
|
|
|
|
|
|
#11 |
|
User
Official Map Reviewer
Join Date: Jan 2006
Posts: 362
![]()
|
Note: You didn't need to add TEXTMAP_FLAG_, I already gave you TEXTMAP_ and you put that in too :p
|
|
|
|
|
|
#12 | |
|
Free Software Terrorist
Technical Director
|
Quote:
|
|
|
|
|
|
|
#13 |
|
Evil Emoticon
Respected User
Project Leader: PoC |
IMPORTANT UPDATE: Now you can use autocompletion for vJASS. You must add the vJASS.api file contained in the zip file, and extract it to Your_Notepad++_Dir\plugins\APIs. Now you can use the auto completion by pressing CTRL+SPACE and you will see the list of functions. Press ENTER to autocomplete the desired text.
Now the common.j and common.ai files will be highlighted, making more easier your coding process :) Please check the first post and update your files :D |
|
|
|
|
|
#14 | ||
|
User
|
I don't understand the highlighting procedure.
Quote:
Can you please explain this step? Quote:
Press CTRL+SPACE where? Inside Notepad ++? Also does Notepad ++ indent after certain keywords? |
||
|
|
|
|
|
#15 |
|
Evil Emoticon
Respected User
Project Leader: PoC |
My apologies for my late response, I don't know why I didn't see this thread :P
The important part of this is:
If you create a new file and you want to select the vJASS highlighting, click on the menu Language > vJASS, and it will highlight it for you :) About the autocompletion functionality, it works when you are writing code, just write part of the command and press CTRL+SPACE and a list box will appear. If you write more in the command, the list box updates automatically narrowing the functions which begin with the word that you are writing. To select the word, just press ENTER or make double click with the mouse. tell me if it works now. About the autoindent.... no, it doesn't do that, it only remember the last indent done I'm afraid. Last edited by moyack : 06-23-2007 at 11:17 PM. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
|
Donate |