Jump to content
Sehrentos

(Git) rAthena syntax highlight for notepad++

Recommended Posts

Defined rAthena NPC scripting language for Notepad++.

 

Link: https://github.com/Sehrentos/rAthena-syntax-highlight

 

Keywords contents

  • NPC script commands.
  • Constants from db/const.txt

How to add to Notepad++?

  • Open your Notepad++ and go to the Language > Define your language... > Import.
  • Use default styles in the Settings > Style Configurator > Select theme: Default.
  • Or you can download example style theme /themes/rAthenaWhite.xml and import it Settings < Import < Import style theme(s)....
  • Restart Notepad++ after changing language or styles.

Make a new style theme or edit existing one:

  • Make a new theme by copying stylers.xml in %APPDATA%\Notepad++ and rename it for your theme and edit it.
  • Save it in %APPDATA%\Notepad++\themes folder.
  • Restart Notepad++ after edit.

Auto-completion

  • Copy APIs/rathena.xml to Notepad++ installation folder APIs/rathena.
  • Open menu Settings > Preferences... > Auto-Completion tab, check "Enable auto-completion on each input".
  • Restart Notepad++.

Sources:

Happy editing  /no1

 

Image:

rathena-syntax-highlight.png

 

 

Thanks, @Cydh for auto-completion

Edited by Sehrentos
  • Upvote 5

Share this post


Link to post
Share on other sites

I've made one some time ago, too. However mine is not for rAthena only and not finnished yet ^^

http://15peaces.com/blog/index.php/sunshine-ro-script/

 

This looks nice. Thanks for the info :D

 

 

@nanakiwurtz

Yeah, sorry for slow reply on this.

When using other themes you need to create a new theme for each one.

styler.xml at "AppData\Roaming\Notepad++"

 

But it seems you already did that on your forked version.

/no1

Edited by Sehrentos

Share this post


Link to post
Share on other sites

@@nanakiwurtz: Yes you are doing it right. Both ways work just fine.

Make a new theme by copying stylers.xml in (C:\Users\<user>\AppData\Roaming) and rename it for your theme and edit it. Save it in themes folder.
Import a theme by using notepad++'s import theme tool at settings menu.

/no1

Edited by Sehrentos

Share this post


Link to post
Share on other sites

can I make a PR for auto-completion? https://github.com/Sehrentos/rAthena-syntax-highlight/pull/1

and currently I'm testing for parameter hints, but seems my current NPP won't show any hints from any languages. xD

 

Sure thing, merged :)

 

Hmm yeah hints not working. Would be nice thou

 

Function list next in todo:

http://notepad-plus-plus.org/features/function-list.html

Edited by Sehrentos

Share this post


Link to post
Share on other sites

Another PR, styling.

Changes, as pictures below

  1. Makes comments in italic
  2. Added TODO, FIXME, CHECKME, and BUG as Delimiter3 with red-bold-colored
  3. Added prefix & extras for number to recognize hexa number

TUZX8I0.png

HPAAVWi.png

Share this post


Link to post
Share on other sites

Just started using this, makes everything so much easier to read.

  • Upvote 1

Share this post


Link to post
Share on other sites

afaik, function list only listing the function that used in a file.
Somehow I interested in snippets, just double-click the entry in snippets and the function will be added. /slur
but can't find any clue how to add custom snippets yet, and built-in snippets by Npp is closed source /heh
 
hmm this one? https://github.com/ffes/nppsnippets
 
 
EDIT:
in progress, this is using that plugin (Snippets) just need to add custom library for their NppSnippets.sqlite
 
any suggestion? maybe grouping like

Party - <command name> - <Desc>
Party - <command name> - <Desc>
 
Guild - <command name> - <Desc>
Guild - <command name> - <Desc>
 
Item - <command name> - <Desc>
Item - <command name> - <Desc>

 
55SCM8Q.png

 

 

 

 

 

barely done, using RegEx

3ujFRP7.png

Share this post


Link to post
Share on other sites

Looks interesting, good idea.

 

Don't have any new suggestions on it yet /heh

Edited by Sehrentos

Share this post


Link to post
Share on other sites

I don't import....

"fail to import".....

 

 

 

Ok...done.

Edited by XDXDMAN

Share this post


Link to post
Share on other sites

just in case some still follow this topic and project, I just pushed new changes and make a new PR https://github.com/Sehrentos/rAthena-syntax-highlight/pull/6

just a random sample from rAthena script

image.png.49034977edf9d12dccf002fd6d8657c6.png

image.png

 

about the NppSnippets plugin, I don't know what state on my last changes back then (3 years ago) so that's why I never make it public. xD

Edited by Cydh
  • Love 1
  • MVP 1

Share this post


Link to post
Share on other sites

Updates and folding fixed in https://github.com/Sehrentos/rAthena-syntax-highlight/pull/7

 

7 hours ago, sikiro said:

hey @Cydh ive used this for a while to help me edit scripts would it be possible to make it work with this dark theme https://github.com/Ludomancer/VS2015-Dark-Npp cause white makes my eyes bleed it works however all code is highlited in white.

@sikiro you can try this, just made, didn't add to main repo yet for testing purpose https://github.com/cydh/rAthena-syntax-highlight/blob/cydh-devel/rAthena-VS2015-Dark.xml

NOTE: It's not NPP theme, it's just recolor, if you want to stick this as "rathena user-defined language", you have to remove the 'white'-ver first then import that file.

 

rathena-udl-vs2015-dark-2.thumb.png.f0d6d3b83d10cf1ac2f39c291a450cea.png

Edited by Cydh
  • Upvote 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.