Raised This Month: $168 Target: $400
 42% 

AMXX Keywords for Syntax Highlighting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-05-2009 , 05:12   AMXX Keywords for Syntax Highlighting
Reply With Quote #1

Keywords for Highlighting:

With the attached files you can create your own syntax highlighting if your favorite source code editor allows user defined syntax highlighting. Also, I've created specific collections for DOD and CS. With these two I have included my syntax highlighting I use for Notepad++.

Seta00 has created syntax highlighting to be like it is in Pawn Studio if you prefer it's colors and can be found here. Or, if you prefer the [pawn][/pawn] tag colors you can get that here.

Notepad++ Auto-Completion and Hints:

Notepad++ has a feature to autocomplete functions and show the arguments and description for a function. I made the required xml file to make this work for AMX Mod X functions to go with the syntax highlighting. Counter-Srike is the only MOD that I've done so far. If you would like another MOD specifc one I can do it. Also, if you find anything missing let me know.

Installation:
Close Notepad++.
Put the .xml file in PathToProgramFiles\Notepad++\plugins\APIs\
Make sure to name the file exactly as the syntax highlighting is named.
Start Notepad++ and turn on Auto-Complete and/or Hints (it is off by default): Settings > Preferences > Backup/Auto-Completion > Auto-Completion




-

UPDATED: v2, Added xs functions to "AMX". Added macros (Thanks for reminding me stupok).

UPDATE: v3, I didn't realize xs wasn't a "mod" so I updated DOD and CS (including syntax highlighting).

EDIT: If you wanted my php scripts, PM me and I will send them to you.

Tags: notepad plus plus syntax highlight highlighting
Attached Files
File Type: zip Keywords_AMX_v3.zip (19.3 KB, 3774 views)
File Type: zip Keywords_CS_v3.zip (31.7 KB, 2941 views)
File Type: zip Keywords_DOD_v3.zip (31.2 KB, 1125 views)
File Type: zip CS_autocomplete_and_hints.zip (21.5 KB, 1919 views)
__________________

Last edited by fysiks; 08-11-2010 at 21:20.
fysiks is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-05-2009 , 23:39   Re: AMXX Keywords for Syntax Highlighting
Reply With Quote #2

Awesome, thanks! I use a text editor which it seems like not very many other people do, so there aren't any AMXX/Pawn definitions for it yet. I've always wanted to put one together, and this should help me out a lot!

Cheers!
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 03-06-2009 , 06:58   Re: AMXX Keywords for Syntax Highlighting
Reply With Quote #3

I like this, good idea! How long did this take?

Avalanche, where the hell have you been?
BOYSplayCS is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-06-2009 , 08:44   Re: AMXX Keywords for Syntax Highlighting
Reply With Quote #4

It took a few days to write the php code with regex to catch everything that had a "regular" format (constants were the hardest ). I had to learn regex at that point (lots of testing).

After I got those scripts to work, I had to weed out any duplicates. And then I had to find the few things that were found as constants but were functions. Then I put them in Notepad++ and went through all the includes to make sure everything that needed highlighting had it. I was always missing the kRender constants . So added them manually.

Anyway, the days that I spent actually working on this probably took me about a week maybe shorter. I did most of the work back in November or December.
__________________
fysiks is offline
xPaw
AMX Mod X Moderator
Join Date: Jul 2008
Old 03-06-2009 , 12:17   Re: AMXX Keywords for Syntax Highlighting
Reply With Quote #5

hmm i placed userDefinedLang.xml in Notepad++ (i didnt had userDefinedLang.xml before), and it didnt worked.
__________________
xPaw is offline
iNspiratioN
Member
Join Date: Feb 2009
Location: Lithuania
Old 03-06-2009 , 14:19   Re: AMXX Keywords for Syntax Highlighting
Reply With Quote #6

Quote:
Originally Posted by xPaw View Post
hmm i placed userDefinedLang.xml in Notepad++ (i didnt had userDefinedLang.xml before), and it didnt worked.
Try to place it in
Code:
C:\Documents and Settings\%username%\Application Data\Notepad++\
i think you will see userDefineLang.xml so replace it with current one and RENAME from "userDefinedLang.xml" -> "userDefineLang.xml".
iNspiratioN is offline
xPaw
AMX Mod X Moderator
Join Date: Jul 2008
Old 03-06-2009 , 14:32   Re: AMXX Keywords for Syntax Highlighting
Reply With Quote #7

yeap thanks with name now it worked ;)
__________________
xPaw is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-06-2009 , 19:25   Re: AMXX Keywords for Syntax Highlighting
Reply With Quote #8

Ok, I fixed the Notepad++ filename and I changed the instructions. On my computer it doesn't work if I put it in Application Data. It only works if I put it in Program Files. The first time I installed it I think it worked that way but not this time. Maybe it's because I installed as UNICODE but replaced the files with the ANSI version (to get the plugins to work ).

Thanks guys.
__________________
fysiks is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 03-06-2009 , 21:00   Re: AMXX Keywords for Syntax Highlighting
Reply With Quote #9

Any change you can release that script? The keywords helped me a lot, but functions do not have their prototypes, and SciTE doesn't recognize them.
__________________

Community / No support through PM
danielkza is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-06-2009 , 23:21   Re: AMXX Keywords for Syntax Highlighting
Reply With Quote #10

Quote:
Originally Posted by danielkza View Post
Any change you can release that script? The keywords helped me a lot, but functions do not have their prototypes, and SciTE doesn't recognize them.
prototypes? Do you mean native, public, and stock? (Those three are grouped together.
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:37.


Powered by vBulletin®
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Theme made by Freecode