Sunday, July 29, 2018

Re: syntax highlighting not correct in bash script

With the vim 8.1.0224 from git, I see the problem. (BTW, the colours depend totally upon the colour scheme being used, so characterizing the problem by the colours seen isn't very useful. Maybe using the default scheme, starting vim with --clean -N could be.)

The problem causes the syntax colouring to lose track of what is quoted, and following lines of script are coloured as if quoted.

The maintainer of sh.vim has fixed quoting problems in his latest version, 179, at http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH and indeed version 179 colours your snippet correctly for me; it works with the 8.0.1453 I get with my distro, derived from Ubuntu 18.04, so I expect it will work for you.

I imagine your snippet is a minimal example of the problem, kudos for that, but still looks pathological to me; I avoid tricky stuff like that for the sake of my sanity.

Regards, John Little

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: