On 20.09.2023 20:47, Janis Papanagnou wrote:
On 20.09.2023 14:50, castAway wrote:
[ awk syntax within ksh syntax highlighting ]
Check `:h sh-awk`:
[...]
file into $HOME/.vim/after/syntax/sh/awkembed.vim: >
[code]
This code will then let the awk code in the single quotes: >
awk '...awk code here...'
be highlighted using the awk highlighting syntax. Clearly this may be
extended to other languages.
[...]
Thanks! :-)
Upthread I noted I have problems with new ksh syntax constructs, e.g.
in (( count++ )) the final closing parenthesis is market as error.
This was the primary concern of my (original) post.
The suggestion was - granted, it's a kludge - to set syntax to 'zsh'
(instead of 'sh'). This changed the coloring slightly but it worked
as as far as such constructs were not any more marked as errors. Fine.
The awkembed.vim suggestion now doesn't work correctly with the other
syntax issue; now either awk programs have a correct coloring but I
see those spurious syntax errors (with syntax=sh and awkembed.vim) or
I see no spurious errors but the whole awk program is uncolored (with syntax=zsh).
It would be nice to have a solution that works correctly for both
requirements.
I tried to install a $HOME/.vim/after/syntax/zsh/awkembed.vi for zsh
but obviously this is not how this is supposed to work.
Any idea or how to fix both issues reliably (not just one or the other)?
Janis
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)