From 1e3c72671d3ad7c6fdaedb59693230b53ab87910 Mon Sep 17 00:00:00 2001 From: h-east Date: Sun, 2 Nov 2025 06:39:58 +0900 Subject: [PATCH] Update repeat.{txt,jax} --- doc/repeat.jax | 8 +++++++- en/repeat.txt | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/repeat.jax b/doc/repeat.jax index 9f23a3fab..db39dbbff 100644 --- a/doc/repeat.jax +++ b/doc/repeat.jax @@ -1,4 +1,4 @@ -*repeat.txt* For Vim バージョン 9.1. Last change: 2025 Oct 13 +*repeat.txt* For Vim バージョン 9.1. Last change: 2025 Nov 01 VIM リファレンスマニュアル by Bram Moolenaar @@ -320,6 +320,12 @@ Vim script の書き方はユーザーマニュアルの41章|usr_41.txt|を参 `filetype plugin indent on` を全ての `packadd!` よりも 「後に」書く必要がある。 + 起動時に `!` が必要かをプログラム的に判断するには、 + |v:vim_did_init| を確認する: 0 の場合は `!` を使用する + (|load-plugins| の処理を重複させないため)。それ以外の + 場合は `!` なし (プラグインファイルの読み込みを強制す + るため。そうしないと自動では読み込まれない)。 + また |pack-add| も参照。 {|+eval| 機能付きでコンパイルされたときのみ有効} diff --git a/en/repeat.txt b/en/repeat.txt index d1b2012ce..79b293c57 100644 --- a/en/repeat.txt +++ b/en/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 9.1. Last change: 2025 Oct 13 +*repeat.txt* For Vim version 9.1. Last change: 2025 Nov 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -328,6 +328,12 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. you will need to write `filetype plugin indent on` AFTER all `packadd!` commands. + To programmatically decide if `!` is needed during + startup, check |v:vim_did_init|: use `!` if 0 (to not + duplicate |load-plugins| step), no `!` otherwise (to + force load plugin files as otherwise they won't be + loaded automatically). + Also see |pack-add|. {only available when compiled with |+eval|}