Groups | Search | Server Info | Login | Register


Groups > comp.editors > #106680

Re: In vim, how to tell which version of a syntax file is being used?

From Eric Pozharski <apple.universe@posteo.net>
Newsgroups comp.editors
Subject Re: In vim, how to tell which version of a syntax file is being used?
Date 2025-02-16 15:29 +0000
Organization A noiseless patient Spider
Message-ID <slrnvr4136.gek.apple.universe@freight.zombinet> (permalink)
References <voqf8p$a4fg$1@news.xmission.com> <vor4g5$7l11$1@dont-email.me> <voreqk$akck$1@news.xmission.com>

Show all headers | View raw


with <voreqk$akck$1@news.xmission.com> Kenny McCormack wrote:
> In article <vor4g5$7l11$1@dont-email.me>, Janis Papanagnou
> <janis_papanagnou+ng@hotmail.com> wrote:
>>On 15.02.2025 17:27, Kenny McCormack wrote:

*SKIP* [  2 lines   3 levels deep]
>>> I want to know if there is some variable that is set by the syntax
>>> apparatus that tells me either or both of:
>>> 1) What version of sh.vim was used?
>>> 2) The full path of the used sh.vim file?

As I understand it -- no way.  From what I see:  vim can unload
*specific* functions, hooks, maps, or somethingidefinetelymissing.  vim
doesn't[1] _unsource_ files, that's why it doesn't keep an index.  That
being said...

*SKIP* [  9 lines   2 levels deep]
> But (IMNSHO, of course) those all fit in the "kludgey workarounds"
> category.  I mean, they are indirect ways of coming to an
> approximation of the truth.
> What I really want (and my reason for posting this thread) is to know
> if there is a direct (not directory) way to actually get the
> information, not an approximation.

May I suggest:

	:h sourcep

This is as close to trace as you can get.  Otherwise, per
janis_papanagnou+ng@, strace(1) is at your service.  I can't comment on
autocmd though (never needed them).

*CUT* [  7 lines   1 level deep]

[1] It's "doesn't" and not "can't" because ":h breaka" suggests there're
    strings attached to (compiled?) code and lines of (sourced) files.
    Say, <syntax/vim.vim>, <indent/vim.vim>, (sic)
    <after/ftplugin/vim.vim>, and whatnot are all sourced files of
    VimBasic (sorry for tangent).  Which file would be picked for
    ":breaka vim 42 vim.vim" is a mistery.  (I'm not sure this is
    correct, examples are contradictory.  See?  VimBasic!)

-- 
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom

Back to comp.editors | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

In vim, how to tell which version of a syntax file is being used? gazelle@shell.xmission.com (Kenny McCormack) - 2025-02-15 16:27 +0000
  Re: In vim, how to tell which version of a syntax file is being used? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-15 23:29 +0100
    Re: In vim, how to tell which version of a syntax file is being used? gazelle@shell.xmission.com (Kenny McCormack) - 2025-02-16 01:25 +0000
      Re: In vim, how to tell which version of a syntax file is being used? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-16 05:20 +0100
      Re: In vim, how to tell which version of a syntax file is being used? Eric Pozharski <apple.universe@posteo.net> - 2025-02-16 15:29 +0000
      Re: In vim, how to tell which version of a syntax file is being used? DrunkenThon <drunkenthon@gmail.com> - 2025-02-16 18:44 +0000
      Re: In vim, how to tell which version of a syntax file is being used? Jens Schweikhardt <usenet@schweikhardt.net> - 2025-02-16 22:27 +0000
        Re: In vim, how to tell which version of a syntax file is being used? gazelle@shell.xmission.com (Kenny McCormack) - 2025-02-17 01:03 +0000

csiph-web