awkembed.vim

29 views
Skip to first unread message

J S

unread,
Jul 26, 2019, 9:51:22 AM7/26/19
to v...@vim.org
I get that people read quickly, and also that English is not everyone's first language (a lethal combination, that), but the fact is that in the OP, every word was very carefully chosen, to impart all needed information. Unfortunate, that I need to re-state that which was clearly stated originally.

That all said, the specific problem to which I seek a specific solution is this:

1) I write Expect scripts with embedded AWK script.
2) I would like the embedded AWK code to be highlighted as AWK code.

Further comments:

1) In theory, it should be possible to do this sort of thing with any combination of languages. That is, any enclosing language and any embedded language. Again, to clarify, in my specific case, the enclosing language is Expect and the embedded language is AWK.

2) As far as I can tell, the only specific combination that has been implemented (at least in publicly available VIM script code) is the combination of embedding AWK inside of shell.

As stated, I want to highlight embedded AWK inside of Expect.

Christian Brabandt

unread,
Jul 26, 2019, 10:53:01 AM7/26/19
to v...@vim.org
Well, the general appraoch is explained at :h sh-embed However it was
never clear from your message, that you already know about it and that
you have tried it.

So did you apply the method mentioned there to try to solve your
problem? If so, what exact problem are you facing?

Best,
Christian
--
Manche Frauen tun für ihr Äußeres Dinge, für die ein Gebrauchtwagenhändler
ins Gefängnis käme.

J S

unread,
Jul 26, 2019, 12:22:10 PM7/26/19
to v...@vim.org
I think it should be pretty clear by now that if I thought I could do this myself, I'd have already done so - and would not have posted to this list at all.

IOW, if I have to sweat blood to get this done, it's just not worth it.

I was hoping that either:

1) It had already been done by someone and the code could be made available.
or
2) There exists someone for whom this is a trivial task, and that person could just do it.

Note well, re #2: I am not asking anyone to do any large amount of work. I'm just assuming there is someone out there for whom this task would be trivial.

Christian Brabandt

unread,
Jul 26, 2019, 3:18:13 PM7/26/19
to v...@vim.org

On Fr, 26 Jul 2019, 'J S' via vim_use wrote:

I haven't had a look at the details, but try Ingos Plugin SyntaxRange
https://github.com/inkarkat/vim-SyntaxRange, I believe it tries to use
the code mentioned in the help and make it easier available for users

Best
Christian
--
Das Chaos sei willkommen, denn die Ordnung hat versagt.
-- Karl Kraus

Enno

unread,
Jul 26, 2019, 3:22:43 PM7/26/19
to vim_use
Have a look at how /usr/share/vim/syntax/markdown.vim handles the languages listed in g:markdown_fenced_languages.
Reply all
Reply to author
Forward
0 new messages