Topic: compiler support and syntax highlighting (1 of 21), Read 105 times
Conf: Compiler support
From: Fritz Heberlein
Date: Tuesday, May 30, 2006 09:46 AM

I wonder if it would be possible to combine compiler support and syntax highlighting, i.e. to have a syn_hi file loaded automatically every time vcs.tmp is loaded.

I have been experimenting for a while with smuggling a syntax-load command into some c-*.vdm, but i don't seem to find the right place.

Fritz

 


Topic: No Topic (2 of 21), Read 88 times
Conf: Compiler support
From: Ted Green
Date: Tuesday, May 30, 2006 07:32 PM

I am out of the office this week and therefore cannot answer such complex
questions. I will investigate next week.
Ted.

 


Topic: compiler support and syntax highlighting (3 of 21), Read 90 times
Conf: Compiler support
From: Christian Ziemski
Date: Wednesday, May 31, 2006 07:40 AM

On 5/30/2006 9:46:38 AM, Fritz Heberlein wrote:
> i.e. to have a syn_hi file loaded automatically every time
> vcs.tmp is loaded.
>
> I have been experimenting for a while with smuggling a
> syntax-load command into some c-*.vdm, but i don't seem to
> find the right place.

I don't have time to do it now (and I didn't use compilers for a long time...) but I would try it

in file C:\vedit\compile\C-INIT.VDM
in subroutine :OPEN-VCS.TMP:
just before the last return (line 742).

Don't forget to enable SyntaxHighlighting!

Christian

 


Topic: Re: compiler support and syntax highlighting (4 of 21), Read 91 times
Conf: Compiler support
From: Christian Ziemski
Date: Wednesday, May 31, 2006 05:01 PM

On 5/31/2006 4:29:24 PM, Fritz Heberlein wrote:
>
>What I have done is
>
>(a) to insert the syntax-load command at the place designated by you
>(b) to open vcs.tmp
>(c) to load a synhi file
>(d) to enable syntax
>highlighting via the config menu
>(e) to save the file extension config.
>
>Anything wrong?

I'm no longer sure that I understood your plan correctly ...

I thought two commands like
Config(PG_E_SYNTAX,1)
Syntax_Load("comp-err.syn")
would have been enough to load a special syntax file for vcs.tmp.

Or do you want different syntax files?

Please let us know more details about your plan.


Christian

 


Topic: Re: compiler support and syntax highlighting (5 of 21), Read 91 times
Conf: Compiler support
From: Fritz Heberlein
Date: Thursday, June 01, 2006 01:50 PM

vtech-compile Listmanager schrieb:
> From: "Christian Ziemski"
>
> On 5/31/2006 4:29:24 PM, Fritz Heberlein wrote:
>
> I'm no longer sure that I understood your plan correctly ...
>
> I thought two commands like
> Config(PG_E_SYNTAX,1)
> Syntax_Load("comp-err.syn")
> would have been enough to load a special syntax file for vcs.tmp.
>
> Or do you want different syntax files?

OK, i tried to do it the manual way, since inserting the above commands
at the place specified by you (c-init.vdm, section ":OPEN-VCS.TMP:",
just before the last return() didn't have any effect.

And yes, I would like to have different syntax files. I *need* one for
editing TeX files (i have been using one for many years and it simply
works fine) and *would be glad* to have another for vcs.tmp. So it could
pick out the relevant info at a glance (ca. 80% of the warnings
delivered by the TeX compiler are irrelvant for my personal purposes).

Regards,

Fritz

 


Topic: Re: compiler support and syntax highlighting (6 of 21), Read 97 times
Conf: Compiler support
From: Christian Ziemski
Date: Thursday, June 01, 2006 03:03 PM

On Thu, 01 Jun 2006 13:50:00 -0400, Fritz Heberlein wrote:

>since inserting the above commands at the place specified
>by you (c-init.vdm, section ":OPEN-VCS.TMP:",
>just before the last return() didn't have any effect.
>
>And yes, I would like to have different syntax files.
>I *need* one for editing TeX files [...] and *would be glad*
>to have another for vcs.tmp. So it could
>pick out the relevant info at a glance (ca. 80% of the
>warnings delivered by the TeX compiler are irrelvant for
>my personal purposes).

Fritz:

My above lines do work.
Unfortunately they are switched off again twice...

In file C-COMPIL.VDM in line 77
and in file C-INIT.VDM around line 760:

Config(PG_E_SYNTAX,0,LOCAL) //Disable Syntax Highlight in output file


If you comment out those lines (at least for testing) it should work.
I tried it sucessfully here with the Java environment.


BTW: Not a bad idea to have a separate syntax file for errors!


Christian

 


Topic: Re: compiler support and syntax highlighting (7 of 21), Read 123 times
Conf: Compiler support
From: Fritz Heberlein
Date: Thursday, June 01, 2006 03:36 PM

> My above lines do work.
> Unfortunately they are switched off again twice...
>
> In file C-COMPIL.VDM in line 77
> and in file C-INIT.VDM around line 760:
>
> Config(PG_E_SYNTAX,0,LOCAL) //Disable Syntax Highlight in output file
>
>
> If you comment out those lines (at least for testing) it should work.
> I tried it sucessfully here with the Java environment.


Wow, this did it!

Thank you so much - for the moment i'm simply happy!

Fritz

 


Topic: Re: compiler support and syntax highlighting (8 of 21), Read 139 times
Conf: Compiler support
From: Fritz Heberlein
Date: Friday, June 02, 2006 03:39 AM

Christian:

I have a follow-up question:

is there a special reason that you have disabled syntax highlighting in
your compiler support files?
If not, would you consider leaving out that commands in future versions?
That way, adding syn_hi would be a bit easier.

BTW, do you think it would be possible to transfer the syntax_load
command to the *.vcs? In that case setting up syn_hi for individual
compilers would be even easier and
it wouldn't be overwritten with every new installation.

Thanks again,

fritz

 


Topic: Re: compiler support and syntax highlighting (9 of 21), Read 143 times
Conf: Compiler support
From: Christian Ziemski
Date: Friday, June 02, 2006 04:43 AM

On 6/2/2006 3:39:41 AM, Fritz Heberlein wrote:
>
>I have a follow-up question:
>is there a special reason that you have disabled syntax
>highlighting in your compiler support files?

Fritz:

I didn't do that.
Most of the code is done by Ted and Tom. I only modified it here and there.

So let's wait for Ted being back in the office and comment on it.


>BTW, do you think it would be possible to transfer the
syntax_load command to the *.vcs?
>In that case setting up syn_hi for individual compilers would be even easier [...]

That is a good idea and should be possible.


Christian

 


Topic: Re: compiler support and syntax highlighting (10 of 21), Read 137 times
Conf: Compiler support
From: Christian Ziemski
Date: Sunday, June 04, 2006 05:33 AM

On Fri, 02 Jun 2006 03:39:00 -0400, Fritz Heberlein wrote:

>BTW, do you think it would be possible to transfer the syntax_load
>command to the *.vcs? In that case setting up syn_hi for individual
>compilers would be even easier

Just for testing I tried it without .VCS file modification.

I enhanced my earlier mentioned lines in file
C:\vedit\compile\C-INIT.VDM in subroutine :OPEN-VCS.TMP:

Config(PG_E_SYNTAX,1)
Syntax_Load("comp-err.syn")

to

if (File_Exist("|(HOME)\COMPILE\|@(91)-OUT.SYN")) {
Syntax_Load("|(HOME)\COMPILE\|@(91)-OUT.SYN")
Config(PG_E_SYNTAX,1,LOCAL) //enable SynHi in output file
} else {
Config(PG_E_SYNTAX,0,LOCAL) //disable SynHi in output file
}


So for example you have to create a Syntax file LATEX-OUT.SYN in
C:\VEDIT\COMPILE to have the VCS.OUT highlighted when using LATEX
compler support.

>and it wouldn't be overwritten with every new installation.

That has to be checked...


One strange thing happens when using Syntax_Load() in this context:
If the VCS.OUT is displayed and that window is closed by [ESC] key as
mentioned in the bottom status line there is a buffer error.

I don't understand that for now. Perhaps Syntax_Load() interferes with
some internals of the compiler support?!?


Christian

 


Topic: Re: compiler support and syntax highlighting (11 of 21), Read 138 times
Conf: Compiler support
From: Christian Ziemski
Date: Sunday, June 04, 2006 06:31 AM

>One strange thing happens when using Syntax_Load() in this context:
>If the VCS.OUT is displayed and that window is closed by [ESC] key
>as mentioned in the bottom status line there is a buffer error.

And not only in this case.

>Perhaps Syntax_Load() interferes with [...] compiler support?!?


Reason found.

C:\VEDIT\COMPILE.MNU and C:\VEDIT\JAVA-SDK.MNU are using #124 to store
the text register number for the execution of the appropriate macro.

But the new (experimental) Syntax_Load() - executed within the above
macros - internally uses LOADSYN.VDM which in turn changes the
numerical registers #111-#124...

And so the COMPILE.MNU fails at return due to the now "wrong" #124.


I fixed that by changing #124 to #55 in COMPILE.MNU and JAVA-SDK.MNU
and in the initial comments in C-INIT.VDM.

(#55 is pushed/popped and seems to be unused otherwise.)


Christian

 


Topic: Re: compiler support and syntax highlighting (13 of 21), Read 161 times
Conf: Compiler support
From: Christian Ziemski
Date: Monday, June 05, 2006 12:34 PM

Another change for
C:\vedit\compile\C-INIT.VDM in subroutine :OPEN-VCS.TMP:

Config(PG_E_SYNTAX,0,LOCAL) //disable Syntax Highlight in output file
if (File_Exist("|(HOME)\COMPILE\|@(91)-OUT.SYN")) {
Syntax_Load("|(HOME)\COMPILE\|@(91)-OUT.SYN")
Config(PG_E_SYNTAX,1,LOCAL) //enable Syntax Highlight in output file
} else {
if (File_Exist("|(HOME)\COMPILE\GENERIC-OUT.SYN")) {
Syntax_Load("|(HOME)\COMPILE\GENERIC-OUT.SYN")
Config(PG_E_SYNTAX,1,LOCAL) //enable Syntax Highlight in output file
}
}
Return

This ways there may be a GENERIC-OUT.SYN to be used for syntax highlighting when there is no compiler specific one.

Christian

 


Topic: Re: compiler support and syntax highlighting (14 of 21), Read 169 times
Conf: Compiler support
From: Fritz Heberlein
Date: Monday, June 05, 2006 04:33 PM

Thanks Christian,

for your interesting findings. I'm out of office presently and will
study them when I'm back to work.

Fritz

 


Topic: Re: compiler support and syntax highlighting (15 of 21), Read 173 times
Conf: Compiler support
From: Peter Rejto
Date: Sunday, July 30, 2006 12:09 PM

Hello Fritz,

How are you?

I would appreciate sharing your recent LATEX.VCS file with me.


At the same time a big thank you to both of you for this e-mail thread. I plan to use it in my research project of trying to understand the interaction between LATEX.VCS and C-INIT.VDM.


-peter.

 


Topic: Re: compiler support and syntax highlighting (16 of 21), Read 122 times
Conf: Compiler support
From: Pauli Lindgren
Date: Tuesday, May 20, 2008 10:53 AM

On 6/5/2006 12:34:53 PM, Christian Ziemski wrote:
>Another change for
> C:\vedit\compile\C-INIT.VDM in subroutine :OPEN-VCS.TMP:
>
> Config(PG_E_SYNTAX,0,LOCAL) //disable Syntax Highlight in output file
> if (File_Exist("|(HOME)\COMPILE\|@(91)-OUT.SYN")) {
> Syntax_Load("|(HOME)\COMPILE\|@(91)-OUT.SYN")

I tried your C-INIT.VDM, but it did not show syntax colors.
There is a command to turn off syntax highlighting in C-COMPIL.VDM, too. When I commented out this, the syntax colors came visible.

However, the result is quite horrible.
The macro sets window color to blue background. But since I am normally using white background, the syntax colors are on white background, too. This means that highlighted keywords etc. will be in white background, while other parts of window are in blue background.

So the commands to set window color need to be removed, too.
This has the drawback that now the compiler output window looks the same as all the other windows.

(Ted: It would be really nice if the syntax colors were buffer specific.)

--
Pauli

 


Topic: Re: compiler support and syntax highlighting (17 of 21), Read 140 times
Conf: Compiler support
From: Christian Ziemski
Date: Tuesday, May 20, 2008 01:22 PM

On 20.05.2008 16:54 vtech-compile Listmanager wrote:
> From: "Pauli Lindgren"
>
> I tried your C-INIT.VDM, but it did not show syntax colors.
> [and more problems]

Pauli:

Thanks for the first tests!
I apologize for posting that macro too early.

Today I tried to get the compiler environment running after 2 years...
It doesn't work, even with the original macros out of the Vedit
distribution files. :-(
(e.g. problems with vcs.tmp)

I'll try to find out more.

Until later.

Christian

 


Topic: Re: compiler support and syntax highlighting (18 of 21), Read 152 times
Conf: Compiler support
From: Fritz Heberlein
Date: Tuesday, May 20, 2008 02:11 PM

vtech-compile Listmanager schrieb:

> Today I tried to get the compiler environment running after 2 years...
> It doesn't work, even with the original macros out of the Vedit
> distribution files. :-(


It's running excellent here ... (Win 2000 and Win XP).

Fritz

 


Topic: Re: compiler support and syntax highlighting (19 of 21), Read 152 times
Conf: Compiler support
From: Peter Rejto
Date: Tuesday, May 20, 2008 10:59 PM

On 5/20/2008 2:11:22 PM, Fritz Heberlein wrote:
>vtech-compile Listmanager
>schrieb:
>
>> Today I tried to get the compiler environment running after 2 years...
>> It doesn't work, even with the original macros out of the Vedit
>> distribution files. :-(
>
>
>It's running excellent here
>... (Win 2000 and Win XP).
>


Fritz,

I would appreciate getting your syntax highlighting files for TeX.

Thanks,

-peter.
>

 


Topic: Re: compiler support and syntax highlighting (21 of 21), Read 153 times, 1 File Attachment
Conf: Compiler support
From: Fritz Heberlein
Date: Monday, June 02, 2008 02:49 PM

>Fritz,
>
>I would appreciate getting your syntax
>highlighting files for TeX

Attached here (it's not very sophisticated ...)

Fritz

 
TEX.SYN (2KB)

 


Topic: Re: compiler support and syntax highlighting (20 of 21), Read 129 times, 1 File Attachment
Conf: Compiler support
From: Christian Ziemski
Date: Wednesday, May 21, 2008 08:55 AM

On 5/20/2008 10:53:50 AM, Pauli Lindgren wrote:

>I tried your C-INIT.VDM, but it did not show syntax colors.
>[...]
>However, the result is quite horrible. The macro sets window color to blue
>background. But since I am normally using white background, the syntax
>colors are on white background, too.
>This means that highlighted keywords etc. will be in white background, while
>other parts of window are in blue background.
>
>So the commands to set window color need to be removed, too.
>This has the drawback that now the compiler output window looks the same as
>all the other windows.

Pauli:

I now checked and changed the relevant compiler macros.
One reason for the failure on your PC was that I hadn't posted all needed macros...

As attachment my current compiler macros (the changed ones after 2005).
The *.vdm need to be in C:\vedit\compile.
The *.syn and *.vcs need to be in SUPPORTPATH (probably the same dir as above).


I tested the macros with GCC and JAVAC successfully.
But please take them as beta test for now!!!


Changes since 2005:

- The SUPPORTPATH in Compile.cnf can be given in a much more flexible way now
(As path with spaces, with or without double quotes, with optional comment)

- The vcs.tmp file (compiler output) is shown with syntax highlighting if there is
an appropriate file *-OUT.syn in the SUPPORTPATH directory ("*" is the same
compiler name as used for the *.VCS file, eg. GCC-OUT.SYN).
As background color the same color is used as in the original source code window.
If there is no such *-OUT.SYN the macro tries to find and use GENERIC-OUT.SYN.
If that one isn't existing as well, no syntax highlighting is used here and
the window color is the original blue.
Those *-OUT.SYN files may describe the warning-/error-syntax of the used compiler.

- The vcs-tmp.bat file used for calling the compiler is no longer stored in
the project directory but in VEDIT_TEMP.
So even very long (deep) project directories doesn't kill the Sys() calling the compiler.

The macro calls for that changed too.
Example from GCC.VCS:
:COMPILE:
[...]
//old: Call(103,"MAKE-BAT") // Create VCS-TMP.BAT file
//old: System('"|@(96)\vcs-tmp.bat"',DOS+NOMSG+SIMPLE)
//new:
Call(103,"EXEC-COMPILER") // Create and execute VCS-TMP.BAT

So you have to change your *.VCS files a little bit!


Christian

 
VCMP.ZIP (21KB)

 


Topic: Re: compiler support and syntax highlighting (12 of 21), Read 121 times
Conf: Compiler support
From: Ted Green
Date: Monday, June 05, 2006 11:25 AM

At 03:37 PM 6/1/2006, you wrote:
>Wow, this did it!
>Thank you so much - for the moment i'm simply happy!

Thank you Christian for solving this.
I was gone for several days - our youngest daughter recently graduated from Penn State and we moved her to Syracuse, NY where she has her first job.

Ted.