AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting (https://forums.alliedmods.net/showthread.php?t=93892)

decaprime 06-03-2009 19:44

[TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
1 Attachment(s)
2010-5-26
Updated Notepad++ UserDefinedLang.xml
(right click > Save As)


I do a majority of my programming in Visual Studio and I'm starting to write scripts for my server and sought to replicate that environment. With pawn studio no longer being/no longer fully functional, and not enough time to code a language service for Visual Studio I have mimicked the functionality in Notepad++

A picture probably demonstrates this best:
http://content.screencast.com/users/...d/npp_tool.png

Important: There are issues with the latest version of notepad++, this was developed and tested with the 5.1.X version. Later versions have an issue that won't expand functions with long descriptions try SetHudTextParams( to test with your version. I haven't pinpointed the version this starts occurring, input is appreciated.

A few notes:
-Installation instructions are in the readme.txt in the zip
-I have nothing to do with notepad++ itself and the auto-completion functionality isn't super reliable.
-In generating the inline docs I set the word wrap arbitrarily, and I run on a fairly high resolution (1920x1200) if this is an issue for enough people I can make another version.
-If notepad++ crashes there is a good chance the preferences for the auto-completion got reset, just reapply them.
-Feel free to recolor the syntax and redistribute with credit

Thanks to CShadowRun and devicenull

theY4Kman 06-03-2009 20:11

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Brilliant!

Downtown1 06-04-2009 03:18

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Would this have hotkeys to build by any chance? Would be nice :). Using Pawn Studio right now but it crashes a lot.

Chris-_- 06-04-2009 06:28

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Wow, awesome.

decaprime 06-04-2009 11:25

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Quote:

Originally Posted by Downtown1 (Post 841274)
Would this have hotkeys to build by any chance? Would be nice :). Using Pawn Studio right now but it crashes a lot.

Shouldn't be a problem, if you go to the Run menu you can do a run command like

YourPathHere\spcomp.exe $(FULL_CURRENT_PATH)

Then you can just save it and assign a hotkey. Here is the docs on that: http://notepad-plus.sourceforge.net/uk/run-HOWTO.php I'm also thinking about making a small program to automate play testing a bit, like compile/check/upload/replace with backup/rcon sm reload or something.

Shaman 06-06-2009 21:21

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Great job!

recon0 06-06-2009 22:18

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Looks really cool :)

InflatableSoulmate 06-07-2009 02:45

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Fantastically helpful. Thanks!

This'll definitely lower bandwidth usage from me on the "Script Functions" portion of this site. :)

Chris-_- 06-07-2009 18:19

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
What a way of perspetive >.<

Cadav0r 06-08-2009 13:14

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Thanks

Downtown1 06-09-2009 03:49

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Quote:

With source pawn no longer being/no longer fully functional
Did you mean Pawn Studio?

decaprime 06-09-2009 10:39

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Quote:

Originally Posted by Downtown1 (Post 844713)
Did you mean Pawn Studio?

Oh good catch, yes that's what I meant =)

ZeroFreeze 06-15-2009 04:15

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Thanks for making this. I occasionally got confused whilst writing complex plugins due to the lack of highlighting :3

Dragonshadow 06-15-2009 18:52

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Thank you :D this is awesome

TESLA-X4 06-16-2009 04:15

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Awesome job there, thanks for sharing it! :D

Downtown1 06-16-2009 12:37

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Here's a link to 5.1.4 till this plugin works with 5.4.x

http://sourceforge.net/project/showf...ease_id=653152

thacursedpie 06-18-2009 04:40

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
AWESOME! This is just... awesome! The one thing I was missing... :) thanks man!

Bigbuck 07-13-2009 23:12

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Has any more work been done on this to make it work with newer Notepad++ versions? Notepad++ is the only program I use for all of my coding or scripting so this would be really nice to have.

decaprime 07-14-2009 07:42

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Quote:

Originally Posted by Bigbuck (Post 871717)
Has any more work been done on this to make it work with newer Notepad++ versions? Notepad++ is the only program I use for all of my coding or scripting so this would be really nice to have.

As far as I can see, the data conforms to the official specification in the wiki. They broke their own spec in one of the later versions. I really have no interest in recoding the Notepad++ modules that do this- but I have a feeling at some time they will release a version that fixes whatever they broke. Make sure you're running it in administrator mode for whatever version you have (if you're on windows 7 or vista)

AtomicStryker 07-14-2009 08:46

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Cool, this might spare me from having the Sourcemod API in background while coding xD

MoggieX 07-15-2009 16:51

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Really handy, many thanks!

Matt

Sexual Harassment Panda 07-15-2009 18:12

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Great work, awesome job man.

AtomicStryker 09-06-2009 16:42

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Quote:

Originally Posted by Downtown1 (Post 850210)
Here's a link to 5.1.4 till this plugin works with 5.4.x

http://sourceforge.net/project/showf...ease_id=653152


It doesn't?

http://www.abload.de/thumb/itdoesworkud8x.jpg

5.1.4 crashed an awful lot for me, so i wanted to try and fix this for 5.4.5 ... but it works all by itself? xD


EDIT:

I see he updated it this summer, maybe thats why

Bigbuck 09-06-2009 16:45

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
I was having crashes in 5.4.5 and never narrowed it down to which plugin was causing it. Have you had any issues with 5.4.5 Stryker? Mine would just lock up and then say it crashed.

olj 09-15-2009 07:55

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
5.1.4 works but crashes quite often for no reason...

Where do you get 5.4.5? From official one?

decaprime 09-15-2009 08:49

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
I'm not particularly sure why certain implementations of autocomplete work in different versions, I went off of the spec they had on their sourceforge wiki page- I wrote a program to generate it to that spec so it should be 100% compliant, but its clearly abusing the autocomplete functionality as it was never ment to hold paragraphs, just a few words. Still i've written entire plugins in N++ without it crashing or sometimes editing one line will cause it to lock up, and i'm really not experienced with N++ enough to debug their autocomplete system. I've read that Programmers Notepad says they have support for API XML in the same format as N++ but I coudln't find instructions on how to get them working properly. I like Programmers Notepad better as it is so if anyone wants to play around with it and maybe get the autocomplete working on there it might save the N++ crashing problems.

AtomicStryker 09-16-2009 05:25

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
5.4.5 has yet to crash for me a single time, its beautiful. Although Autocomplete kicks in and out ... but if i just wanted that, i'd use the SourcePawn Editor.

N++ coloring is just SOOOO much better.

olj 09-16-2009 07:49

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Yeah, N++ coloring is sexy, i agree :mrgreen:

Dragonshadow 09-17-2009 10:20

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
2 Attachment(s)
Yea I <3 np++ coloring
I just wish I knew how to edit this thing to make it turn decl the same color as new

Edit: did it lol
Anything else you want changed/added I can try to do

AtomicStryker 09-17-2009 19:13

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Yes, add 'String' to have the same color as 'Float'. Ah nevermind did it myself.

Oh and change 'stock' to have the same color as Action ... i also changed bool to it

A little advice: When you want to share something like this, don't do it in some obscure 7zip format only 7zip can open.

Dragonshadow 09-17-2009 21:50

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
1 Attachment(s)
Uhm... its just zip.
I use 7zip for all my compression so...

Edit: Added that stuff

Changelog so far:

Added decl to the syntax highlighting, colored like new
String is colored like Float
stock & bool are colored like Action

--

Compressed with deflate (default) this time instead of lzma

Dragonshadow 09-18-2009 17:16

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Any more requests feel free to post

olj 09-19-2009 05:48

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Quote:

Originally Posted by Dragonshadow (Post 936377)
Uhm... its just zip.
I use 7zip for all my compression so...

Edit: Added that stuff

Changelog so far:

Added decl to the syntax highlighting, colored like new
String is colored like Float
stock & bool are colored like Action

--

Compressed with deflate (default) this time instead of lzma

Nice +carma to you :)

AtomicStryker 09-20-2009 06:41

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
I've also added 'any' to have the same Color as 'Handle'

Dragonshadow 09-20-2009 11:50

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
What are your thoughts on making all functions a color (to tell them apart from 1) custom functions and 2) normal stuff like string/etc names)

olj 09-21-2009 04:37

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
What color to use then? You mean color-code SourceMode stock functions, so we can easily differ them from custom ones?

Kilandor 09-30-2009 07:09

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Thanks for this, Personaly I changed "Number"'s to be orange.

And many programs can open 7zip, but anyways.

I tried to look into the auto completion problem but could see nothing to fix it really, unless you just shorten them all or, try to file a bug report or something with Notepad++

But if you don't mind Losing all Descriptions, just so you can still have the Parameters on all functions just open sourcemod.xml and find all descr=" and replace them with desc=" This way Parameters still complete.

Dragonshadow 10-04-2009 10:33

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Quote:

Originally Posted by olj (Post 939350)
What color to use then? You mean color-code SourceMode stock functions, so we can easily differ them from custom ones?

Yes thats what I mean. I'm going to see if a shade of orange works

Dragonshadow 10-04-2009 17:30

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
1 Attachment(s)
Huzzah huge update:

bool, Float, String, and any are now colored like Action & Handle
All base sourcemod functions are now colored
Curlybraces are larger
Numbers are colored
event, client, Client, timer, data, and decl are colored like new, switch, if, etc.
Renamed custom language from sourcemod to SourcePawn.

Bigbuck 10-04-2009 17:48

Re: [TOOLS] Notepad++ Auto-completion/Inline Docs/Syntax Highlighting
 
Seems to work fine, thanks for the update.


All times are GMT -4. The time now is 18:39.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.