Notepad++ language template for PureBasic?

For everything that's not in any way related to PureBasic. General chat etc...
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Notepad++ language template for PureBasic?

Post by Mistrel »

Does anyone know if one of these exist? :?
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Notepad++ language template for PureBasic?

Post 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
Last edited by Vera on Mon Dec 20, 2010 10:19 pm, edited 3 times in total.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Notepad++ language template for PureBasic?

Post 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.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4662
Joined: Sun Apr 12, 2009 6:27 am

Re: Notepad++ language template for PureBasic?

Post 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
Egypt my love
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Notepad++ language template for PureBasic?

Post 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
Last edited by Vera on Fri Feb 12, 2010 4:06 pm, edited 1 time in total.
Baldrick
Addict
Addict
Posts: 860
Joined: Fri Jul 02, 2004 6:49 pm
Location: Australia

Re: Notepad++ language template for PureBasic?

Post 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.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Notepad++ language template for PureBasic?

Post 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.
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Notepad++ language template for PureBasic?

Post 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
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Notepad++ language template for PureBasic?

Post 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. :)
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4662
Joined: Sun Apr 12, 2009 6:27 am

Re: Notepad++ language template for PureBasic?

Post 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
Egypt my love
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Notepad++ language template for PureBasic?

Post 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.
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Notepad++ language template for PureBasic?

Post by Vera »

Hello,

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

greetings ~ Vera
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Notepad++ language template for PureBasic?

Post 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.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2810
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Re: Notepad++ language template for PureBasic?

Post 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]
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Notepad++ language template for PureBasic?

Post by blueznl »

We love kinky. All of us :twisted:
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply