Syntax highlighter for vim - Now Available V2!

Working on new editor enhancements?
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Syntax highlighter for vim - Now Available V2!

Post by dracflamloc »

Would anyone be interested in a syntax highlighter file for purebasic in vim?

I'll probably make it just for myself, just curious if anyone would want me to post it.


[Edit] V2 is ready - Added "And" and "Or":

http://www.dracsoft.com/zips/vim-purebasic.zip

Linux filetype.vim:
http://www.dracsoft.com/zips/vim-filetype-linux.zip

Autocomplete dictionaries:
http://www.dracsoft.com/zips/vim-pb-dict.zip
Last edited by dracflamloc on Thu Oct 27, 2005 2:11 am, edited 3 times in total.
Tommy
New User
New User
Posts: 6
Joined: Wed May 18, 2005 9:18 pm

Post by Tommy »

I would be interested.... :P
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Alright when its done i'll post it here.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Will be appreciated. Thanks. :)
@}--`--,-- A rose by any other name ..
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

btw, anyone have a text file of all pb functions?
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

search the forum, the compiler is supposed to generate one on every call
( 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... )
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

dracflamloc wrote:btw, anyone have a text file of all pb functions?
see here: viewtopic.php?t=11456
"Procedure.l ExtractPBFunctions()""
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Yea I found the files the compiler makes. I'm all set. The highlighter is ready to be tested and I'll post it soon.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Ok heres the first version.

If you've made personal changes to filetype.vim you should add the purebasic auto-syn line yourself.


http://www.dracsoft.com/zips/vim-purebasic.zip


Enjoy! If you make any changes to the purebasic.vim file you should post them back here!

If you're new to vim, you can turn on the syntax highlighting by doing ":sy on"
Last edited by dracflamloc on Wed Oct 26, 2005 1:30 am, edited 1 time in total.
Tommy
New User
New User
Posts: 6
Joined: Wed May 18, 2005 9:18 pm

Post by Tommy »

thanks!
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

The filetype.vim in the zip didn't work with linux vim, so heres a different one for linux. The syntax file is still the same.


http://dracsoft.com/zips/vim-filetype-linux.zip


I'll be creating an auto-complete dictionary of all the functions and such soon.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Thanks! :)
@}--`--,-- A rose by any other name ..
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Dictionaries are now available for autocomplete. A good guide for how to use autocomplete dictionaries is here: http://www.vim.org/tips/tip.php?tip_id=91

The dictionaries are here:
http://www.dracsoft.com/zips/vim-pb-dict.zip


I put the following in my purebasic.vim:
set dictionary-=/usr/share/vim/pb-proc-dict dictionary+=/usr/share/vim/pb-proc-dict
set complete-=k complete+=k


This makes the dictionary load/unload every time a pb file is opened, and sets your keyboard shortcut for autcomplete (Ctrl-n) to include the dictionary by default.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Has anyone tried this in the linux console version? I can't seem to get the highlighting to autoload. in gvim it loads automatically however.. just wondering if anyone else had this problem.

The windows console vim autoloads it just fine.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

New version is up. I forgot to put "And" and "Or" !!!
Post Reply