[vim/vim] runtime(misc): Use correct terminal feature test in ftplugins (PR #21208)

7 views
Skip to first unread message

Christian Brabandt

unread,
Sep 1, 2026, 5:20:06 PM (4 days ago) Sep 1
to vim/vim, Subscribed

Problem: The current test 'exists(':terminal') == 2' is valid even in
Vim builds that have the terminal not included (e.g. normal
feature builds) and thus the K key would cause an error:
"E319: Sorry, the command is not available in this version" or
"E117: Unknown function: term_start()"
Solution: Change the terminal feature test to "has('terminal')" to
properly detect Vims without the terminal feature, while at
it, change the Last Change date to the preferred style for Vim
runtime files.

fyi @dkearns @Konfekt


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/21208

Commit Summary

  • 2edfe01 runtime(misc): Use correct terminal feature test in ftplugins

File Changes

(12 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21208@github.com>

Enno

unread,
Sep 1, 2026, 11:14:56 PM (4 days ago) Sep 1
to vim/vim, Subscribed
Konfekt left a comment (vim/vim#21208)

The shape of this check was chosen for compatibility with Neovim, if I remember correctly


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21208/c5503769076@github.com>

Christian Brabandt

unread,
Sep 2, 2026, 4:17:50 AM (4 days ago) Sep 2
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#21208)

But Neovim always has the :terminal command, so it doesn't help. In addition, we will need to check for the term_start() function, which is not available on Neovim


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21208/c5506602822@github.com>

Enno

unread,
Sep 2, 2026, 5:44:14 AM (3 days ago) Sep 2
to vim/vim, Subscribed
Konfekt left a comment (vim/vim#21208)

But Neovim always has the :terminal command, so it doesn't help

That is, Neovim is also compiled without terminal support despite having that command?
The idea was that it is true if Vim has terminal support.

From your musings, there is no check working reliably on Neovim and Vim, so we can only support Vim.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21208/c5507609713@github.com>

Christian Brabandt

unread,
Sep 2, 2026, 8:01:25 AM (3 days ago) Sep 2
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#21208)

as far as I know, neovim always includes all features, so there is no optional terminal support in Neovim. It's always there. But I'll have to change the test for term_start(), because that is a Vim specific function.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21208/c5509182129@github.com>

Reply all
Reply to author
Forward
0 new messages