Saturday, July 13, 2019

awkembed.vim

(On the subject of syntax highlighting languages embedded in other languages)

I frequently write (bash) shell scripts with embedded AWK scripts, and I've found the awkembed.vim script quite useful. I have it installed at:

~/.vim/after/syntax/sh/awkembed.vim

And it works quite well. Now, I would like to extend the idea beyond the set of "shell" and "awk".

There are, obviously, two variables here: The enclosing language and the embedded language. As far as I can tell (based on a little Googoling) this has only been done for the one specific combination: shell & awk. Note: :help sh-embed

Specifically, I have an Expect script with embedded AWK. How hard is it going to be to get this to work?

I took a look at the awkembed.vim script - it's mostly greek to me, although I was able to modify it slightly because my awk has a different name than the one assumed by the script.

It'd be nice if someone could tell me either a quick way to make a script to do what I want - or to tell me it can't be done...

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/1632295224.1316600.1563020677437%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment