Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 35 |
Nodes: | 6 (1 / 5) |
Uptime: | 19:10:13 |
Calls: | 321 |
Calls today: | 1 |
Files: | 957 |
Messages: | 82,383 |
Overall problem: I'm trying to debug a problem in the syntax highlighting
of a particular shell script.
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?
On 15.02.2025 17:27, Kenny McCormack wrote:
Overall problem: I'm trying to debug a problem in the syntax highlighting
of a particular shell script.
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?
If in doubt I'm inspecting (according to :help) what Vim shows me
when I'm typing ':set rtp'. There's a couple directories and mine
shows (for and on a Unix system) '/usr/share/vim/vim73' so my 'sh'
default syntax file would be '/usr/share/vim/vim73/syntax/sh.vim'.
But there's more directories shown in that path list that appear
before the '/usr/share' path, and I have also a local directory >'~/.vim/after/syntax/sh/...' where some changes to the default
behavior for 'sh' are defined.
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:
Overall problem: I'm trying to debug a problem in the syntax highlighting >>> of a particular shell script.
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?
If in doubt I'm inspecting (according to :help) what Vim shows me
when I'm typing ':set rtp'. There's a couple directories and mine
shows (for and on a Unix system) '/usr/share/vim/vim73' so my 'sh'
default syntax file would be '/usr/share/vim/vim73/syntax/sh.vim'.
But there's more directories shown in that path list that appear
before the '/usr/share' path, and I have also a local directory
'~/.vim/after/syntax/sh/...' where some changes to the default
behavior for 'sh' are defined.
Right. I am familiar with all that.
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.
Isn't there some kind of "verbose mode" that makes VIM tell you every file
it sources (as it is sourcing it)? That would be closer to the truth, but still not ideal.
Incidentally, I did put a sh.vim in my locatel syntax directory, and was
able to conclude, using inotifywait, that it was being sourced when a shell script as loaded in vim. But that also is in the "approximation" category.
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:
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?
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.
Kenny McCormack <gazelle@shell.xmission.com> wrote
in <voreqk$akck$1@news.xmission.com>:
...
# Isn't there some kind of "verbose mode" that makes VIM tell you every file ># it sources (as it is sourcing it)? That would be closer to the truth, but ># still not ideal.
Does :scriptnames work for you?