Page 1 of 4

Notepad++ language template for PureBasic?

Posted: Thu Feb 11, 2010 11:02 pm
by Mistrel
Does anyone know if one of these exist? :?

Re: Notepad++ language template for PureBasic?

Posted: Fri Feb 12, 2010 12:07 am
by Vera
Hi Mistrel,

if you like to get mine - you're wellcome :) and everybody who is interrested too

userDefineLang-PB440.xml
userDefineLang-PB450.xml
Note: the Highlighting PB-4.50 still is actual, as no new functions have been added to PB 4.51!

greetings ~ Vera

Re: Notepad++ language template for PureBasic?

Posted: Fri Feb 12, 2010 4:16 am
by Mistrel
Great! Now how do I install it? :?

I'm using Notepad++ 5.6.6.

I've found different solutions on the internet but none of them work. I don't know if something has changed in this more recent version that requires modification.

Re: Notepad++ language template for PureBasic?

Posted: Fri Feb 12, 2010 10:19 am
by RASHAD
@Mistrel
I presume you are running Win 7

1- Rename userDefineLang-PB440.xml To userDefineLang.xml
2- Copy it To c:\users\Mistrel\AppData\Roaming\Notepad++ (If your user name is Mistrel)

You will find PureBasic listed at the End

Re: Notepad++ language template for PureBasic?

Posted: Fri Feb 12, 2010 11:34 am
by Vera
Hello Mistrel,

I thought you were familiar with the userDefineLang.xml ;)
In case you use a portable version of Notepad++ it's placed in the appfolder itself.

You can have several user-languages if you like and they are all within this file, surrounded by
<NotepadPlus>
<UserLang>
one language
</UserLang>

<UserLang>
another language
</UserLang>

</NotepadPlus>
and appear in the editors language-list (very bottom).

You can customize it via implemented GUI (menu View\Custom..dialoge) or directly in a simple editor. (hint - it makes no difference if you use Ansi or Uni-version - the xml works with both, and up to v. 5.6.6).

As for my version I tried to make it look similar to the IDEs standard settings and changing it you'd like to know the following:
- if you like to apply more word-pairs to the codefolding, take them out of the second wordgroup and place them in the fold+ / fold- group - they mustnot appear in both groups
- the round () braces have to stay in the active operatorgroup otherwise the functions don't highlight
- in the 3. wordgroup (besides three activ commands I prefer in this color) I placed those 10 commands that have been removed on update form v.4.31 to v.4.40. If you don't want them to be highlighted differently move them to the 2nd wordgroup and than may use this 3rd group for e.g. M$ commands or whatever you fancy :)

Well - nothing can beat the IDEs-Highlighting - still one needs an external editor now and again ;)

cheers ~ Vera

edit: update and correction

Re: Notepad++ language template for PureBasic?

Posted: Fri Feb 12, 2010 2:03 pm
by Baldrick
Thanks very much for this Vera. :)
I have been using Scite for a while but I think I might switch to this Notepad++ now using your little xml addition. I will just have to teach myself a little xml so I can make it match the 'C' code colorings.

Re: Notepad++ language template for PureBasic?

Posted: Sat Feb 13, 2010 10:34 am
by Mistrel
Is there a way to make this compatible with the global font and color style? The one in the file seems to override the global one.

If I remove the fgColor and bgColor attributes from the file then the text foreground and background become black.

Re: Notepad++ language template for PureBasic?

Posted: Sat Feb 13, 2010 1:41 pm
by Vera
Hi Mistrel

seems you got it working all right now :)
Mistrel wrote:Is there a way to make this compatible with the global font and color style? The one in the file seems to override the global one.
This pb-styler does not define any own font and uses the global one. It only sets some bolds and sizes.
Under Settings\Stylerconfigration: GlobalStyle + globalOverwrite you could set global font settings for all, but here only enable the bgcolor if you wish one color for all filetypes. Enabling the fgcolor etc. will 'destroy' any highlighting.
Under GlobalStyle + defaultStyle you set the global font etc. that will be used as long as a language-setting does not define something else.
Mistrel wrote:If I remove the fgColor and bgColor attributes from the file then the text foreground and background become black.
Same here - I don't think it's a good idea to remove values from a configuration file, you'll just corrupt it ;)
Better than use the View\Custom..dialog if you want to change/remove the determined colorings.

I hope this helped you


Hi Baldrick

thanks for your reply :)
I too use Scite and think it's a very reliable and solid editor and am very glad it runs on Linux. Besides it's kind of rigid whereas NPP++ is much more flexible and brings along a lot of handy tools (plugins)

greetings ~ Vera

Re: Notepad++ language template for PureBasic?

Posted: Sat Feb 13, 2010 9:00 pm
by Mistrel
Thank you for the style configuration and for your help, vera.

From what I understand it's not possible to override the foreground fonts to respect the global color theme so I'll have to edit these myself. I can live with that. :)

Re: Notepad++ language template for PureBasic?

Posted: Sun Feb 14, 2010 2:10 am
by RASHAD
@Mistrel
You can change anything you like For PureBasic spec file As follows :
1- Start notepad++ v5.6.6
2- Goto View-->User-Defined Dialugue
3- User Language : PureBasic
4- Change anything you like (Font name - Font Size - Color ......) Or add keywords Or ....
5- Close the dialogue (Just close it nothing more)
6- Close Notepad++
7- StartNotePad++ again And choose PureBasic from Language

Have fun

Re: Notepad++ language template for PureBasic?

Posted: Sun Feb 14, 2010 2:37 am
by Mistrel
This is true but if I decide to change the global style I have to edit every user defined language to match it. Hence why having it match the global style automatically is preferred.

Re: Notepad++ language template for PureBasic?

Posted: Fri Apr 02, 2010 4:03 pm
by Vera
Hello,

just a small note : you can find the userDefineLang updated to PB 4.50 above.

greetings ~ Vera

Re: Notepad++ language template for PureBasic?

Posted: Wed Sep 01, 2010 4:27 pm
by IdeasVacuum
Excellent stuff Vera.

For NotePad++ v5.7, you can save a PB syntax highlight file in the NotePad++ Folder as a 'stand alone' file and this will then be listed in the NotePad++ Language list as 'Pure Basic' rather than as 'User Defined'.

If anyone likes to have their syntax highlighted in very badly chosen colours, then this is for you:

http://www.professorcad.co.uk/PB_Stuff/ ... hlight.zip

Just un-zip it in the NotePad++ folder.

I actually use UltraEdit on my main PC, NotePad++ on the laptop. I think both are a bit easier to use than PB's IDE. UltraEdit is particularly nice because of it's fabulous column mode editing.

Re: Notepad++ language template for PureBasic?

Posted: Wed Sep 01, 2010 4:30 pm
by Num3
Vera wrote:Hi Mistrel,

if you like to get mine - you're wellcome :) and everybody who is interrested too

greetings ~ Vera
[evil]

Is it my twisted sick mind, or when you write it like that it sounds... erhmmm kinky :twisted: :twisted:

[\evil]

Re: Notepad++ language template for PureBasic?

Posted: Fri Sep 03, 2010 9:43 pm
by blueznl
We love kinky. All of us :twisted: