Duke4.net Forums: Notepad++ CON Syntax Highlighters - Duke4.net Forums

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Notepad++ CON Syntax Highlighters

User is offline   Kyle873 

#1

Hey all.

So Lord Misfit asked me about a Notepad++ syntax highlighter for CON earlier today, and I know there used to be one floating around, but I couldn't find it anywhere. So, I decided to make my own and share it with everyone else too.

Black-on-White Version
White-on-Black Version
10

User is offline   MusicallyInspired 

  • The Sarien Encounter

#2

Nice! How to install...? I'm a bit lost.
0

User is offline   Kyle873 

#3

Settings menu, import, import style theme. When it's imported it should automatically recognize .con files and switch to the styler automatically.

edit:
Oh, and your music pack kicks ass by the way! :angry:

This post has been edited by Kyle873: 04 March 2013 - 04:35 PM

0

User is offline   MusicallyInspired 

  • The Sarien Encounter

#4

Thank you! New version on the way...
0

User is online   blizzart 

#5

View PostKyle873, on 04 March 2013 - 04:03 PM, said:

Hey all.

So Lord Misfit asked me about a Notepad++ syntax highlighter for CON earlier today, and I know there used to be one floating around, but I couldn't find it anywhere. So, I decided to make my own and share it with everyone else too.

Black-on-White Version
White-on-Black Version


They don´t seem to work for me here. I use Notepad++ 6.3 (latest release), but it is still the plain black text on white background (no highlights). Do I have to move the files to a specific directory or can I import it from any directory on my HDD?

And are there .con and .CON files supported or only .con?

I found the Themes directory in Notepad++ but still no differences.

This post has been edited by blizzart: 05 March 2013 - 12:58 PM

0

User is offline   MusicallyInspired 

  • The Sarien Encounter

#6

Hmm, the only thin seems to be that the text is in red and the numbers are in blue. Is it supposed to be more elaborate than that? Either way, it'd still be handy.
0

User is offline   Kyanos 

#7

Ya, that's all I saw too. I assumed it would autofill text for me while typing but I haven't even tested that. I always tell Notepad ++ that my CON files are just C, it highlights some things like comments, numbers and certain common syntax words like state or while. It would be cool to build a CON theme off of that somehow.
0

User is offline   Kyle873 

#8

View PostDrek, on 06 March 2013 - 05:15 PM, said:

Ya, that's all I saw too. I assumed it would autofill text for me while typing but I haven't even tested that. I always tell Notepad ++ that my CON files are just C, it highlights some things like comments, numbers and certain common syntax words like state or while. It would be cool to build a CON theme off of that somehow.


Well that's esentially what I did was create a new theme. Strange that it isn't working for some of you, I created it on NP++ 6.3 so if you're using the latest version, import it, restart and open a CON file, it should work. Just to get an idea of what it should look like though (I use white on black, easier on the eyes IMO, but the black on white theme will use the same syntax colors):

Posted Image

This post has been edited by Kyle873: 07 March 2013 - 09:48 AM

2

User is offline   MusicallyInspired 

  • The Sarien Encounter

#9

Wow. Yeah, mine looks nothing like that. Strange...
0

User is offline   Mateos 

#10

Good evening,

When I read the included .xml files of Notepad++, it looks quite different from yours; See plugins/APIs/ folder :angry:
0

User is offline   Kyle873 

#11

View PostMateos, on 08 March 2013 - 11:46 AM, said:

Good evening,

When I read the included .xml files of Notepad++, it looks quite different from yours; See plugins/APIs/ folder :angry:


As I understand it, the built-in language support using a different XML syntax from the UDL's (User-Defined Languages).

Anyway, after a little more investigating, it seems that the import style option doesn't do a damn thing. Instead, go into the language menu, then select "Define your Language", then click import and import the xml file. Restart and it SHOULD work now.
2

User is offline   Kyanos 

#12

Ok, I'm on my phone right now. I like what I see in your pic a few posts up, I'll be trying to get it working tonight and report back. I read quite a bit on the notepad ++ website, installation of user defined languages was tricky, it mentioned putting the file " UserDefinedLanguage.xml" in "username"/appdata//roaming/notepad++/...
0

User is offline   Kyle873 

#13

You shouldn't need to do all that, the instructions I gave one post up should work fine.
1

User is offline   Kyanos 

#14

Nice!! I took a screenie too. All I needed to do was update, seems older versions don't support your style of .xml.
Attached Image: Capture.PNG
1

User is offline   Kyle873 

#15

View PostDrek, on 08 March 2013 - 02:04 PM, said:

Nice!! I took a screenie too. All I needed to do was update, seems older versions don't support your style of .xml.
Attachment Capture.PNG


Ah, good to see. Now there's a screenshot of both themes now too, nice.
0

#16

Well, although the m32 script files are similar to con files, I decided to make a notepad++ highlighter for m32 script files.

Let me guess, someone somewhere has already done that somewhere ? Well, I couldn't find it, plus investigating notepad++'s user defined language support has been on my to-do list for a very long time. The result is attached.

For both my laptops (win7 64-bit and win 8), and as mentioned in a previous post, I had to put the xml file in /users/[user]/AppData/roaming/notepad++. Once you've done that, in Notepad++ select menu [Language] -> [Define Your Language] and in the resulting dialog press the [import] button and select the xml file. You may need to close and reopen any m32 files already loaded, you may need to restart Notepad++.

I've only done a white background version - attempting a black background (as I'd prefer) caused all sorts of issues with other languages which I need to look at some time. I've tried to adopt a similar colouring and keyword-type grouping to that used by the original poster for CON files but added:
1) Different colour for variables that are actually passed into the script - currently sprite[],wall[], that kinda stuff, not complete though as I'm still new to these m32 files.
2) Highlighted things (using background highlighting) that should not be in a release version of an m32 file, using either orange for debug statements or red for items that the eduke wiki marks as deprecated or not ready for use.
3) Code folding. This isn't possible in CON files, but well done whoever designed m32 scripts and used 'defstate' instead of 'state' at a start of a block, doing it properly made all the difference.
4) Support for quoted strings and hex numbers (the latter was a right ******, please check it works for you!). Neither of these are needed in CON files.

I'm open to any suggestions if you thing the colour scheme choices could be improve (other than for comments - they WILL be grey. Ok?).

TTFN,
Jon

Attached File(s)


3

User is offline   DavoX 

  • Honored Donor

#17

thanks a lot of all your efforts Jon. Good Work!
0

User is offline   Daedolon 

  • Ancient Blood God

#18

If anyone has figured out how to really do syntax profiles for Notepad2 or Sublime, please let me know. I've been wanting to do a CON syntax for both for years but I was never able to really figure out the syntax profiles.
0

#19

View PostDaedolon, on 19 August 2015 - 07:06 AM, said:

If anyone has figured out how to really do syntax profiles for Notepad2 or Sublime, please let me know. I've been wanting to do a CON syntax for both for years but I was never able to really figure out the syntax profiles.


Scintilla (used by Norepad2) is hard coded and rediculously complicated. Notepad2 itself no longer compiles. Sublime is a much better bet - another thing on my do-list, I'm very happy with notepad++ but it is windows-only whilstI also use Linux which rules it out. Also Sublime has an advantage in that it seperates the language definition from the presentation, so people can apply their own themes. Anyone else here use Sublime ?

TTFN,
Jon
0

User is offline   Daedolon 

  • Ancient Blood God

#20

View PostThe Mechanic, on 19 August 2015 - 11:24 AM, said:

Scintilla (used by Norepad2) is hard coded and rediculously complicated.


I feel like Notepad++ is a massive bloatware with the gazillion of menus and tab systems and side-menus (like it's Visual Studio or something) so I could never get into it. Notepad2 is the perfect notepad.exe replacement so this makes :D

Need to take a look at Sublime's syntax stuff I guess, I exhausted all of my interest for a CON syntax profile on Notepad2.
0

#21

View PostDaedolon, on 19 August 2015 - 12:03 PM, said:

I feel like Notepad++ is a massive bloatware with the gazillion of menus and tab systems and side-menus (like it's Visual Studio or something) so I could never get into it. Notepad2 is the perfect notepad.exe replacement so this makes :D

Need to take a look at Sublime's syntax stuff I guess, I exhausted all of my interest for a CON syntax profile on Notepad2.


Until fiddling with language stuff, you know in all the years I've used notepad++ I don't think I ever used any of the menus. I just edit text and save. And at 30MB it's disk space usage is modest enough. As regards Visual Studio, its a complex poerfull piece of software package and menu complexity come with the teritory. Sure, I swore a bit when trying to find out how to specify a manifest file when trying to get notepad2 to compile (and swore again when it still didn;t fix the problem), but bless it Visual Studio is awesome ( except 2008-2010, when the murdered C/C++ functionality).

It took notepad++ to finally ween me of my previous favorite text editor - PFE32 - and I suspect Sublime may replace my notepad++ in due course. However I think Sublime's custom language definitions may be undergoing a change at the moment ?
0

User is offline   Mark 

#22

Notepad++ has 1 window opened. I ignore the single row of feature icons across the top. From the normal dropdown menus I use open / close, copy / paste, and save. Once in a while when I need to use the search feature a small window pops up to type in a search word. Very plain and simple program for me because I'm probably not using more than a small percentage of it's features. I started using Notepad++ because it was recommended for doing con coding.

This post has been edited by Mark.: 02 September 2015 - 11:31 AM

0

User is offline   Daedolon 

  • Ancient Blood God

#23

I guess first impressions matter, it just looks so cluttered and confusing I'd rather use blender. I literally want my notepad to look like the default Windows notepad, which is why notepad2 or sublime are great choices for me, especially since they have amazing features for text manipulation through keyboard shortcuts instead of hiding them in the menus.
0

User is offline   Mark 

#24

I hear you on Blender. But Notepad++ is nothing like that. This is what I get using that program. See the little tab called Zombie.con? There would be a row of those tabs if you have loaded say all the different cons and defs from a project. Simple one click to go from one to the other. The tabs are there every time you open the program unless you choose to close them. So you don't have to reload them every time. As I mentioned before, you don't need to use any of those icons across the top. I use the dropdown menus and most of those have keyboard shortcuts. I would think this would be just what you are looking for. I used to use Windows Notepad or Wordpad until this came along. Clean and simple.

Attached thumbnail(s)

  • Attached Image: notepad.jpg

0

User is offline   Daedolon 

  • Ancient Blood God

#25

I'm not looking for anything, I'm using Notepad2 and Sublime (2) for my text editing needs.
0

User is offline   Mark 

#26

Thats fine. I just wanted to clear it up for anyone else looking for a new editor to try.
0

#27

If you're on Linux and want to use Notepad++ then you can just use wine or this: http://notepadqq.altervista.org/wp/
0

#28

The links in the first post are dead.

Here is another Notepad++ CON Syntax Highlighters I got from Mark.
Notepad++ CON Syntax Highlighters

I know this is a old post but it was the only post about Notepad++ CON Syntax Highlighters I found on google. And was a dead end.So now its not.

You can let this post get buried now.
1

User is offline   Daedolon 

  • Ancient Blood God

#29

I've been trying to understand how the syntax language works in Notepad2 or Sublime Text but with no luck.
0

User is offline   RPD Guy 

#30

Well, I'm using visual studio code. It's very cool.
I'm creating an extension for CON language. The syntax check and highlighting isn't complete yet. VS code can be used with GIT, so you can see what u changed in real time. (see attachment)

Attached Image: conex1.png
0

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options