Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocaml.vim script not working correctly #8446

Closed
vicuna opened this issue Jan 13, 2004 · 4 comments
Closed

ocaml.vim script not working correctly #8446

vicuna opened this issue Jan 13, 2004 · 4 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Jan 13, 2004

Original bug ID: 2036
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Holger Dell
Version: OCaml-3.07p2
OS: Windows/Cygwin (sorry)
Submission from: p508ae11c.dip.t-dialin.net (80.138.225.28)

Hi,
I am using Vim 6.2 and got a problem with the file
http://www.ai.univie.ac.at/~markus/ocaml_sources/ocaml.vim
(link can be found at http://www.ocaml.org).

the syntax highlighting doesn't work correctly.
if you have the following code:

let xs = [1; 2; 3] in
let f x = false in
let x = List.for_all f xs
and b = "foo"

the syntax-highlighting thinks "for" is the beginning of a "for"-loop, so the
syntax highlighting after that point doesn't work correctly.
and i think that's because the vim-script treats "_" like a whitespace, and that
is obviously incorrect.

the problem is not only with "for", it also happens with "begin" or "open" as
well.
it's not a serios bug, but it is annoying, please fix that.

thank you.

@vicuna
Copy link
Author

vicuna commented Jan 14, 2004

Comment author: administrator

[Holger, I am forwarding your mail to Markus, the author of ocaml.vim]
[Markus, this is a bug report we got in the OCaml bug database]

Full_Name: Holger Dell
Version: OCaml-3.07p2
OS: Windows/Cygwin (sorry)
Submission from: p508ae11c.dip.t-dialin.net (80.138.225.28)

Hi,
I am using Vim 6.2 and got a problem with the file
http://www.ai.univie.ac.at/~markus/ocaml_sources/ocaml.vim
(link can be found at http://www.ocaml.org).

the syntax highlighting doesn't work correctly.
if you have the following code:

let xs = [1; 2; 3] in
let f x = false in
let x = List.for_all f xs
and b = "foo"

the syntax-highlighting thinks "for" is the beginning of a "for"-loop, so the
syntax highlighting after that point doesn't work correctly.
and i think that's because the vim-script treats "_" like a whitespace, and
that
is obviously incorrect.

the problem is not only with "for", it also happens with "begin" or "open" as
well.
it's not a serios bug, but it is annoying, please fix that.

thank you.

@vicuna
Copy link
Author

vicuna commented Jan 14, 2004

Comment author: administrator

This is not a bug in OCaml proper. Forwarded to Markus. -DD 2004-01-14

@vicuna vicuna closed this as completed Jan 14, 2004
@vicuna
Copy link
Author

vicuna commented Jan 14, 2004

Comment author: administrator

Hi Damien and Holger,

I have tried the code below with Vim-version 6.2.149, and it doesn't
cause any problems with highlighting. Maybe it's just a misconfiguration
of your editor?

You may have to set the variable "iskeyword" to include the underscore
character in keywords.

Regards,
Markus

--
Markus Mottl http://www.oefai.at/~markus markus@oefai.at

On Wed, 14 Jan 2004, Damien Doligez wrote:

[Holger, I am forwarding your mail to Markus, the author of ocaml.vim]
[Markus, this is a bug report we got in the OCaml bug database]

Full_Name: Holger Dell
Version: OCaml-3.07p2
OS: Windows/Cygwin (sorry)
Submission from: p508ae11c.dip.t-dialin.net (80.138.225.28)

Hi,
I am using Vim 6.2 and got a problem with the file
http://www.ai.univie.ac.at/~markus/ocaml_sources/ocaml.vim
(link can be found at http://www.ocaml.org).

the syntax highlighting doesn't work correctly.
if you have the following code:

let xs = [1; 2; 3] in
let f x = false in
let x = List.for_all f xs
and b = "foo"

the syntax-highlighting thinks "for" is the beginning of a "for"-loop, so the
syntax highlighting after that point doesn't work correctly.
and i think that's because the vim-script treats "_" like a whitespace, and
that
is obviously incorrect.

the problem is not only with "for", it also happens with "begin" or "open" as
well.
it's not a serios bug, but it is annoying, please fix that.

thank you.

@vicuna
Copy link
Author

vicuna commented Jan 15, 2004

Comment author: administrator

Hi Markus,

Sorry, my mistake.
I'm doing literate programming, so I'm using noweb together with OCaml.
Someone has written a vim-script to syntax highlight all the code; in
those noweb-environments ocaml-highlighting and elsewhere
TeX-highlighting. Obviously this script is not working correctly.

I tried a normal .ml-file and got no error.

thank you and sorry,

holger

On Thu, 15 Jan 2004, Markus Mottl wrote:

Hi Damien and Holger,

I have tried the code below with Vim-version 6.2.149, and it doesn't
cause any problems with highlighting. Maybe it's just a misconfiguration
of your editor?

You may have to set the variable "iskeyword" to include the underscore
character in keywords.

Regards,
Markus

@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant