Raised This Month: $ Target: $400
 0% 

gVim Syntax Hilighting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 01-06-2009 , 19:03   Re: gVim Syntax Hilighting
Reply With Quote #1

Quote:
Originally Posted by Downtown1 View Post
Hmmm, maybe we can get some binds to use the compiler from inside vim too?
I added this to my syntax file:
Code:
set makeprg=/path/to/spcomp\ %
set errorformat=%f\(%l\)\ :\ fatal\ %t%*[^0-9]%n:\ %m,%f\(%l\)\ :\ %t%*[^0-9]%n:\ %m
Of course, change the path. Leave the "\ %" on the end. You can put it anywhere in the syntax file, so if you've got vim set up to automatically set the syntax when you open an .sp file, it'll set makeprg and the error format.

Then you can do :make and it'll compile it and use the built in quickfix stuff for pointing out errors. (:help quickfix) You can bind a key yourself to do :make if you want. This works for me and I don't see why it wouldn't work for others, but I haven't tested except on my Linux system.
Fyren is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 01-16-2009 , 02:41   Re: gVim Syntax Hilighting
Reply With Quote #2

Updated the script to catch some things it missed before. Again, named it .log so I could attach.
Attached Files
File Type: log vim.pl.log (14.5 KB, 384 views)
Fyren is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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