🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #1

Vim - set differing syntaxes in split view of the same source file?

#1
From: Janis Papanagnou
Date: Wed, 07 Oct 2026 16:49
18 lines
1927 bytes
Occasionally I've in script programs embedded code of other script
languages, say, awk code embedded in shell code. (But we could also
imagine other embeddings, like assembly in "C", CSS or JS in HTML,
inline-data in shell, or some such.)

I just tried to ':split' the screen and define on the fly another
syntax by ':set syntax=...', but that setting affects both parts of
the split-screen.

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.)

Janis

[*] Yet I achieve the desired behavior by having a separate but
specific vim syntax-code in $HOME/.vim/after/syntax/sh/awkembed.vim
Technical Details
Message-ID: <11a5t6k$2fkbe$3@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.editors
Subject: Vim - set differing syntaxes in split view of the same source file?
Date: Wed, 7 Oct 2026 18:49:24 +0200
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <11a5t6k$2fkbe$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 07 Oct 2026 16:49:24 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2609518"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+bn2N3T5R2Pv6+8Q71ythR"; posting-host="d33541e634ece8542e1941a047acdc12"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JdTU0wT3k723m9jX9xh9MqnI1po= sha256:Qb6D+JVbu94VDh9nyeTjOg90UT8/RjXxQ9aPYRKdMpA=
	sha1:OMalXUCMEefaowzPsUOpqNJ5xSQ= sha256:OIVenS0ADmZOri53hO5MXtwKsvmLbcpdLo5kr49wa+U=
Content-Language: en-US