* [Caml-list] Quoted strings and vim-syntax-highlighting
@ 2016-03-01 15:03 Oliver Bandel
2016-03-01 15:05 ` Oliver Bandel
0 siblings, 1 reply; 6+ messages in thread
From: Oliver Bandel @ 2016-03-01 15:03 UTC (permalink / raw)
To: caml-list
Hello,
the vim-syntax highlighting seems not to know
the "Quoted strings" (RefmMan 7.24).
The following phrase breaks the syntax-highlighting at the '"'-symbol:
Buffer.add_string buffer {|label("|};
Is this a known problem, that maybe will be fixed soon?
Or are vim-syntax-experts here who can add this to the
list of TODO's?
Ciao,
Oliver
P.S.: This workaround works:
Buffer.add_string buffer {|label("|};(*"*)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Quoted strings and vim-syntax-highlighting
2016-03-01 15:03 [Caml-list] Quoted strings and vim-syntax-highlighting Oliver Bandel
@ 2016-03-01 15:05 ` Oliver Bandel
2016-03-01 15:07 ` Oliver Bandel
0 siblings, 1 reply; 6+ messages in thread
From: Oliver Bandel @ 2016-03-01 15:05 UTC (permalink / raw)
To: caml-list
Zitat von Oliver Bandel <oliver@first.in-berlin.de> (Tue, 01 Mar 2016
16:03:59 +0100)
[...]
>
> P.S.: This workaround works:
> Buffer.add_string buffer {|label("|};(*"*)
It works for vim-highlighting, but it the compiler does not eat it.
"Error: This comment contains an unterminated string literal"
Maybe tweaking errors/wrnings can help here at least...
Ciao,
Oliver
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Quoted strings and vim-syntax-highlighting
2016-03-01 15:05 ` Oliver Bandel
@ 2016-03-01 15:07 ` Oliver Bandel
2016-03-01 15:10 ` Markus Mottl
0 siblings, 1 reply; 6+ messages in thread
From: Oliver Bandel @ 2016-03-01 15:07 UTC (permalink / raw)
To: caml-list
Zitat von Oliver Bandel <oliver@first.in-berlin.de> (Tue, 01 Mar 2016
16:05:47 +0100)
> Zitat von Oliver Bandel <oliver@first.in-berlin.de> (Tue, 01 Mar
> 2016 16:03:59 +0100)
> [...]
>>
>> P.S.: This workaround works:
>> Buffer.add_string buffer {|label("|};(*"*)
>
>
> It works for vim-highlighting, but it the compiler does not eat it.
>
> "Error: This comment contains an unterminated string literal"
>
> Maybe tweaking errors/wrnings can help here at least...
[...]
This one does it:
Buffer.add_string buffer {|label("|};(*{|"|}*)
But a solution in the vim-syntax-highlighting would be better, of course...
Ciao,
Oliver
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Quoted strings and vim-syntax-highlighting
2016-03-01 15:07 ` Oliver Bandel
@ 2016-03-01 15:10 ` Markus Mottl
2016-03-01 20:49 ` Glen Mével
0 siblings, 1 reply; 6+ messages in thread
From: Markus Mottl @ 2016-03-01 15:10 UTC (permalink / raw)
To: Oliver Bandel; +Cc: caml-list
It's a known issue, but I'm currently too busy to do anything about
it. Please feel free to implement a solution, and I'll add it to the
Vim-syntax file for OCaml.
Regards,
Markus
On Tue, Mar 1, 2016 at 10:07 AM, Oliver Bandel
<oliver@first.in-berlin.de> wrote:
>
> Zitat von Oliver Bandel <oliver@first.in-berlin.de> (Tue, 01 Mar 2016
> 16:05:47 +0100)
>
>> Zitat von Oliver Bandel <oliver@first.in-berlin.de> (Tue, 01 Mar 2016
>> 16:03:59 +0100)
>> [...]
>>>
>>>
>>> P.S.: This workaround works:
>>> Buffer.add_string buffer {|label("|};(*"*)
>>
>>
>>
>> It works for vim-highlighting, but it the compiler does not eat it.
>>
>> "Error: This comment contains an unterminated string literal"
>>
>> Maybe tweaking errors/wrnings can help here at least...
>
> [...]
>
>
> This one does it:
>
> Buffer.add_string buffer {|label("|};(*{|"|}*)
>
>
> But a solution in the vim-syntax-highlighting would be better, of course...
>
>
> Ciao,
> Oliver
>
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
--
Markus Mottl http://www.ocaml.info markus.mottl@gmail.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Quoted strings and vim-syntax-highlighting
2016-03-01 15:10 ` Markus Mottl
@ 2016-03-01 20:49 ` Glen Mével
2016-03-01 21:29 ` Markus Mottl
0 siblings, 1 reply; 6+ messages in thread
From: Glen Mével @ 2016-03-01 20:49 UTC (permalink / raw)
To: Markus Mottl; +Cc: caml-list
[-- Attachment #1: Type: text/plain, Size: 858 bytes --]
hello,
Le 01/03/2016 16:10, Markus Mottl a écrit :
> It's a known issue, but I'm currently too busy to do anything about
> it. Please feel free to implement a solution, and I'll add it to the
> Vim-syntax file for OCaml.
this does the trick:
syn region ocamlString start="{\z\([a-z_]*\)|" end="|\z1}"
for a more complete addition (i put spellchecking because it was already
set for "" string litterals, not sure if appropriate):
syn region ocamlString matchgroup=ocamlLabel start="{\z\([a-z_]*\)|"
end="|\z1}" contains=@Spell
or, even neater:
syn region ocamlString matchgroup=ocamlQuotedStringDelim
start="{\z\([a-z_]*\)|" end="|\z1}" contains=@Spell
with that line in the appropriate place of the syntax file:
HiLink ocamlQuotedStringDelim Identifier
--
Glen Mével
this has to be implemented in utop too…
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Quoted strings and vim-syntax-highlighting
2016-03-01 20:49 ` Glen Mével
@ 2016-03-01 21:29 ` Markus Mottl
0 siblings, 0 replies; 6+ messages in thread
From: Markus Mottl @ 2016-03-01 21:29 UTC (permalink / raw)
To: Glen Mével; +Cc: caml-list
Thanks, Glen, I've added your last proposal to the OCaml syntax file.
Once in a while I submit it for inclusion in Vim.
Regards,
Markus
On Tue, Mar 1, 2016 at 3:49 PM, Glen Mével <glen.mevel@crans.org> wrote:
> hello,
>
> Le 01/03/2016 16:10, Markus Mottl a écrit :
>> It's a known issue, but I'm currently too busy to do anything about
>> it. Please feel free to implement a solution, and I'll add it to the
>> Vim-syntax file for OCaml.
>
> this does the trick:
>
> syn region ocamlString start="{\z\([a-z_]*\)|" end="|\z1}"
>
> for a more complete addition (i put spellchecking because it was already
> set for "" string litterals, not sure if appropriate):
>
> syn region ocamlString matchgroup=ocamlLabel start="{\z\([a-z_]*\)|"
> end="|\z1}" contains=@Spell
>
> or, even neater:
>
> syn region ocamlString matchgroup=ocamlQuotedStringDelim
> start="{\z\([a-z_]*\)|" end="|\z1}" contains=@Spell
>
> with that line in the appropriate place of the syntax file:
>
> HiLink ocamlQuotedStringDelim Identifier
>
> --
> Glen Mével
> this has to be implemented in utop too…
>
--
Markus Mottl http://www.ocaml.info markus.mottl@gmail.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-03-01 21:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-01 15:03 [Caml-list] Quoted strings and vim-syntax-highlighting Oliver Bandel
2016-03-01 15:05 ` Oliver Bandel
2016-03-01 15:07 ` Oliver Bandel
2016-03-01 15:10 ` Markus Mottl
2016-03-01 20:49 ` Glen Mével
2016-03-01 21:29 ` Markus Mottl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox