From 645704007c362b15088c209341dceec4e3259df3 Mon Sep 17 00:00:00 2001 From: h-east Date: Tue, 15 Jul 2025 21:19:26 +0900 Subject: [PATCH 1/3] Update change.{txt,jax} --- doc/change.jax | 36 ++++++++++++++++++++---------------- en/change.txt | 24 ++++++++++++++---------- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/doc/change.jax b/doc/change.jax index 82fa46525..9efc105d3 100644 --- a/doc/change.jax +++ b/doc/change.jax @@ -1,4 +1,4 @@ -*change.txt* For Vim バージョン 9.1. Last change: 2025 Jun 26 +*change.txt* For Vim バージョン 9.1. Last change: 2025 Jul 14 VIMリファレンスマニュアル by Bram Moolenaar @@ -960,21 +960,25 @@ NOTE: 以前のバージョンでは CTRL-V が特別に扱われていた。こ 4.4 タブの変換 *change-tabs* *:ret* *:retab* *:retab!* -:[range]ret[ab][!] [new_tabstop] - 新たに指定されたタブストップ (タブ幅) に基づき、 - を含む空白の連続を全て、新しい空白と の列に置き - 換える。新たなタブストップの指定がないか0が指定された - ときは、Vimはオプション 'tabstop' の現在の値を使用す - る。'tabstop' の現在の値は、既存のタブの幅を計るために - 常に使用される。'!' を付けると、Vimは通常の空白のみの - 列も、適切なタブに置き換える。 - 'expandtab' がオンのとき、Vimは全てのタブを適切な数の - 空白に置き換える。 - このコマンドは 'tabstop' を新たに指定された値に設定す - る {訳注: この事実は重要である}。ファイル全体に適用さ - れたときは (それが既定の動作)、ファイルの見かけに変化 - が起こることはないはずだ。 - 注意: このコマンドはCプログラム中の文字列内部にある +:[range]ret[ab][!] [-indentonly] [{new-tabstop}] + {new-tabstop} を使用し、 を含むすべての空白文字の + シーケンスを新しい空白文字の文字列に置き換える。 + {new-tabstop} を指定しないか 0 を指定した場合、Vim は + 現在の 'tabstop' の値を使用する。 + 'tabstop' の現在の値は、既存のタブの幅を計算する際に常 + に使用される。 + ! を付けると、Vim は通常の空白のみの文字列も適切な箇所 + でタブに置き換える。 + 'expandtab' をオンにすると、Vim はすべてのタブを適切な + 数の空白に置き換える。 + このコマンドは 'tabstop' を {new-tabstop} に設定する。 + ファイル全体に対して実行した場合 (デフォルト)、目に見 + える変化はない。 + + [-indentonly] が指定された場合、先頭の空白のみが対象と + なる。それ以外の連続する空白は変更されない。 + + Warning: このコマンドはCプログラム中の文字列内部にある 文字も修正する。これを避けるためには、プログラム 内では "\t" を使うとよい (そうでなくても、これはよい習 慣である)。 diff --git a/en/change.txt b/en/change.txt index e958e038b..009441978 100644 --- a/en/change.txt +++ b/en/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 9.1. Last change: 2025 Jun 26 +*change.txt* For Vim version 9.1. Last change: 2025 Jul 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -991,22 +991,26 @@ This replaces each 'E' character with a euro sign. Read more in ||. 4.4 Changing tabs *change-tabs* *:ret* *:retab* *:retab!* -:[range]ret[ab][!] [new_tabstop] +:[range]ret[ab][!] [-indentonly] [{new-tabstop}] Replace all sequences of white-space containing a - with new strings of white-space using the new - tabstop value given. If you do not specify a new - tabstop size or it is zero, Vim uses the current value - of 'tabstop'. + with new strings of white-space using + {new-tabstop}. If you do not specify {new-tabstop} or + it is zero, Vim uses the current value of 'tabstop'. The current value of 'tabstop' is always used to compute the width of existing tabs. With !, Vim also replaces strings of only normal spaces with tabs where appropriate. With 'expandtab' on, Vim replaces all tabs with the appropriate number of spaces. - This command sets 'tabstop' to the new value given, - and if performed on the whole file, which is default, - should not make any visible change. - Careful: This command modifies any characters + This command sets 'tabstop' to {new-tabstop} and if + performed on the whole file, which is default, should + not make any visible change. + + When [-indentonly] is specified, only the leading + white-space will be targeted. Any other consecutive + white-space will not be changed. + + Warning: This command modifies any characters inside of strings in a C program. Use "\t" to avoid this (that's a good habit anyway). `:retab!` may also change a sequence of spaces by From 500f7bd2087e4838578ca05d3dc19f4223283697 Mon Sep 17 00:00:00 2001 From: h-east Date: Wed, 16 Jul 2025 06:40:50 +0900 Subject: [PATCH 2/3] Update by original --- doc/change.jax | 2 +- en/change.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/change.jax b/doc/change.jax index 9efc105d3..224b9ef49 100644 --- a/doc/change.jax +++ b/doc/change.jax @@ -1,4 +1,4 @@ -*change.txt* For Vim バージョン 9.1. Last change: 2025 Jul 14 +*change.txt* For Vim バージョン 9.1. Last change: 2025 Jul 15 VIMリファレンスマニュアル by Bram Moolenaar diff --git a/en/change.txt b/en/change.txt index 009441978..a09637370 100644 --- a/en/change.txt +++ b/en/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 9.1. Last change: 2025 Jul 14 +*change.txt* For Vim version 9.1. Last change: 2025 Jul 15 VIM REFERENCE MANUAL by Bram Moolenaar From 10836b8e9011cf0ce1c6df1babc12ede223d2157 Mon Sep 17 00:00:00 2001 From: h-east Date: Wed, 16 Jul 2025 07:12:09 +0900 Subject: [PATCH 3/3] tweak --- doc/change.jax | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/change.jax b/doc/change.jax index 224b9ef49..0d594cee0 100644 --- a/doc/change.jax +++ b/doc/change.jax @@ -962,7 +962,7 @@ NOTE: 以前のバージョンでは CTRL-V が特別に扱われていた。こ *:ret* *:retab* *:retab!* :[range]ret[ab][!] [-indentonly] [{new-tabstop}] {new-tabstop} を使用し、 を含むすべての空白文字の - シーケンスを新しい空白文字の文字列に置き換える。 + 連続を新しい空白文字の文字列に置き換える。 {new-tabstop} を指定しないか 0 を指定した場合、Vim は 現在の 'tabstop' の値を使用する。 'tabstop' の現在の値は、既存のタブの幅を計算する際に常