Article View: comp.editors
Article #2Re: Vim - set differing syntaxes in split view of the same source file?
From: Kenny McCormack
Date: Wed, 07 Oct 2026 18:42
Date: Wed, 07 Oct 2026 18:42
34 lines
2452 bytes
2452 bytes
In article <11a5t6k$2fkbe$3@dont-email.me>, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote: ... >I wonder whether such a feature - to override the file specific >syntax setting in split-views - would be worthwhile to have.[*] >(This is just a poll on opinions, yet an academic question.) I think not. I assume that the syntax highlighting variables are local to the buffer. This is basically a feature - it's how buffers work. I have sometimes been in the situation of wanting to open the same file twice but force VIM to treat them as separate buffers. I have not tried very hard, but it would be worth testing making a link (either hard or soft) and opening that in a separate window (and hoping it gets a new buffer assigned to it). >Janis > >[*] Yet I achieve the desired behavior by having a separate but >specific vim syntax-code in $HOME/.vim/after/syntax/sh/awkembed.vim I assume that I am not telling you anything you don't already know, but, yes, the standard solution to this is to use awkembed so that the embedded AWK is highlighted as AWK. The problem with that is that it doesn't scale. You have to deal with it for each combination that you encounter. -- People seem to think that Youtube (and Facebook and Twitter and so on) is (are) some sort of resource created for the public good. Why they delude themselves into believing this is beyond my ability to comprehend. Usenet will always be here. Longer than people remember what port 80 was for.
Technical Details
Message-ID:
<11a63qf$35cge$1@news.xmission.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder9.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mailReferences:
<11a5t6k$2fkbe$3@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder9.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail From: gazelle@shell.xmission.com (Kenny McCormack) Newsgroups: comp.editors Subject: Re: Vim - set differing syntaxes in split view of the same source file? Date: Wed, 7 Oct 2026 18:42:23 -0000 (UTC) Organization: The official candy of the new Millennium Message-ID: <11a63qf$35cge$1@news.xmission.com> References: <11a5t6k$2fkbe$3@dont-email.me> Injection-Date: Wed, 7 Oct 2026 18:42:23 -0000 (UTC) Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4"; logging-data="3322382"; mail-complaints-to="abuse@xmission.com" X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: gazelle@shell.xmission.com (Kenny McCormack)