Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update map.{txt,jax} #1460

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 25 additions & 10 deletions doc/map.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*map.txt* For Vim バージョン 9.1. Last change: 2023 May 28
*map.txt* For Vim バージョン 9.1. Last change: 2024 Jan 25


VIMリファレンスマニュアル by Bram Moolenaar
Expand All @@ -20,9 +20,10 @@
1.9 マップを使う |map-typing|
1.10 Altキーを使ったマップ |:map-alt-keys|
1.11 Metaキーを使ったマップ |:map-meta-keys|
1.12 modifyOtherKeys モードのマップ |modifyOtherKeys|
1.13 Kitty キーボードプロトコルを使ったマップ |kitty-keyboard-protocol|
1.14 オペレータの作成 |:map-operator|
1.12 superキーまたはcommandキーのマップ |:map-super-keys|
1.13 modifyOtherKeys モードのマップ |modifyOtherKeys|
1.14 Kitty キーボードプロトコルを使ったマップ |kitty-keyboard-protocol|
1.15 オペレータの作成 |:map-operator|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここですが、mappingのニュアンスを追加する感じに(再訳)はしなくていいですかね?
流れで分るのはありますが。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

影響箇所が多い(1, 1.3, 1.4, 1.5, 1.9 ~ 1.15)ので今回はこのままで。
Issueを立てていただけると助かります。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

作成 #1464

2. 短縮入力 |abbreviations|
3. ローカルマップとローカル関数 |script-local|
4. ユーザー定義コマンド |user-commands|
Expand Down Expand Up @@ -396,7 +397,8 @@ Note:

*E1255* *E1136*
<Cmd> と <ScriptCmd> コマンドではマッピング定義の {rhs} が <CR> で終わる必要が
あります。|Command-line| に入ることはありません。
あります。|Command-line| に入ることはありません。{rhs} でリテラル <CR> を使用
するには、|<lt>| を使用します。


1.3 マップとモード *:map-modes*
Expand Down Expand Up @@ -582,10 +584,12 @@ Note: ビジュアルモードのマップでは "'<" マークが使えます
グを追加したりクリアすることはできません。 *E1309*

*:map-verbose*
'verbose' がゼロ以外のときにマップ一覧を表示すると、どこで定義されたのかも表示
されます。例: >
'verbose' がゼロ以外の場合、検出および使用された 'keyprotocol' の値が最初の行
に表示されます。また、キーマップには、最後に定義された場所も表示されます。
例: >

:verbose map <C-W>*
Kitty keyboard protocol: Cleared
n <C-W>* * <C-W><C-S>*
Last set from /home/abcd/.vimrc

Expand Down Expand Up @@ -971,7 +975,17 @@ Meta 修飾子には文字 "T" が使われます。例えば挿入モードで
:imap <T-b> terrible


1.12 modifyOtherKeys モードのマップ *modifyOtherKeys*
1.12 SuperキーまたはCommandキーのマップ *:map-super-keys* *:map-cmd-key*

Super 修飾子は、Linux 上の GVim および Mac OS 上の MacVim の GUI モード
(|gui_running| が 1 の場合) で使用できます。Mac を使用している場合、これは
Command キーを表し、GTK GUI を使用する Linux では、Super キーを表します。
文字 "D" は、Super / Command 修飾子に使用されます。

例えば、挿入モードで Command-b をマップするには: >
:imap <D-b> barritone

1.13 modifyOtherKeys モードのマップ *modifyOtherKeys*

xterm と他のいくつかの端末は、修飾子付きのキーが特別なエスケープコードで送信さ
れるモードにすることができます。Vim はこれらのコードを認識し、Backspace が文字
Expand Down Expand Up @@ -1035,7 +1049,7 @@ Note xterm の version 376 までは Shift-Esc が通常の Esc を送信し、S
るのを防ぐため、挿入モードで modifyOtherKeys は無効化されます。


1.13 Kitty キーボードプロトコルを使ったマップ *kitty-keyboard-protocol*
1.14 Kitty キーボードプロトコルを使ったマップ *kitty-keyboard-protocol*

'term' の値が "kitty" を含んでいる場合、Vim は Kitty キーボードプロトコルを有
効化するエスケープシーケンスを送出します。これは 'keyprotocol' オプションで変
Expand All @@ -1061,7 +1075,7 @@ Vim はステータス要求 (これは |t_TI| termcap エントリの一部の
以前の状態は不明


1.14 オペレータの作成 *:map-operator*
1.15 オペレータの作成 *:map-operator*

オペレータは {motion} コマンドと合わせて使われます。独自のオペレータを定義する
には、最初に 'operatorfunc' を設定し、そして、|g@| オペレータを呼びます。ユー
Expand Down Expand Up @@ -1608,6 +1622,7 @@ script2.vimを実行すると "None" が表示されます。期待した結果
-complete=help ヘルプの主題
-complete=highlight ハイライトグループ
-complete=history |:history| サブオプション
-complete=keymap キーボードマッピング
-complete=locale ロケール名 (locale -a の出力)
-complete=mapclear バッファ引数
-complete=mapping マップ
Expand Down
31 changes: 22 additions & 9 deletions en/map.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*map.txt* For Vim version 9.1. Last change: 2023 May 28
*map.txt* For Vim version 9.1. Last change: 2024 Jan 25


VIM REFERENCE MANUAL by Bram Moolenaar
Expand All @@ -21,9 +21,10 @@ manual.
1.9 Using mappings |map-typing|
1.10 Mapping alt-keys |:map-alt-keys|
1.11 Mapping meta-keys |:map-meta-keys|
1.12 Mapping in modifyOtherKeys mode |modifyOtherKeys|
1.13 Mapping with Kitty keyboard protocol |kitty-keyboard-protocol|
1.14 Mapping an operator |:map-operator|
1.12 Mapping super-keys or command keys |:map-super-keys|
1.13 Mapping in modifyOtherKeys mode |modifyOtherKeys|
1.14 Mapping with Kitty keyboard protocol |kitty-keyboard-protocol|
1.15 Mapping an operator |:map-operator|
2. Abbreviations |abbreviations|
3. Local mappings and functions |script-local|
4. User-defined commands |user-commands|
Expand Down Expand Up @@ -406,7 +407,7 @@ Note:
*E1255* *E1136*
<Cmd> and <ScriptCmd> commands must terminate, that is, they must be followed
by <CR> in the {rhs} of the mapping definition. |Command-line| mode is never
entered.
entered. To use a literal <CR> in the {rhs}, use |<lt>|.


1.3 MAPPING AND MODES *:map-modes*
Expand Down Expand Up @@ -586,10 +587,12 @@ While mappings are being listed, it is not possible to add or clear mappings,
e.g. from a timer callback. *E1309*

*:map-verbose*
When 'verbose' is non-zero, listing a key map will also display where it was
When 'verbose' is non-zero, the detected and used 'keyprotocol' value will be
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

いってもしょうがないところですけど、non-zeroだと負数もありえそうな記述ですね(原文のみ)

だからというのはあまりないですが...(セットする人もそうそういなさそう?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:vimgrep "verbose.*non-zero" *.txt したら 13か所あったので、今回はそのままで。
本家に修正提案するのはアリだと思います。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

作成 #1465
他も含めて調査しないとだと思ったので

displayed in the first line. Also a key map will also display where it was
last defined. Example: >

:verbose map <C-W>*
Kitty keyboard protocol: Cleared
n <C-W>* * <C-W><C-S>*
Last set from /home/abcd/.vimrc

Expand Down Expand Up @@ -983,8 +986,17 @@ For the Meta modifier the "T" character is used. For example, to map Meta-b
in Insert mode: >
:imap <T-b> terrible

1.12 MAPPING SUPER-KEYS or COMMAND-KEYS *:map-super-keys* *:map-cmd-key*

1.12 MAPPING IN modifyOtherKeys mode *modifyOtherKeys*
The Super modifier is available in GUI mode (when |gui_running| is 1) for
GVim on Linux and MacVim on Mac OS. If you're on a Mac, this represents the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原文の話になりますが、文頭ではないので、"GVim" ではなく "gVim" 表記の方が良さそうですね。参考:
https://github.com/vim/vim/blob/f6272551bdae3f265b6948a4155b079c37fe110f/runtime/doc/intro.txt#L46-L47

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo 報告スレの方に報告しました。vim-jp/issues#1387 (comment)

もし仮にこれを本家 help の typo だとするとして、この場で jax の方の訳文をどうするかはお任せします。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本家修正後で 👍

Command key, on Linux with the GTK GUI it represents the Super key.
The character "D" is used for the Super / Command modifier.

For example, to map Command-b in Insert mode: >
:imap <D-b> barritone

1.13 MAPPING IN modifyOtherKeys mode *modifyOtherKeys*

Xterm and a few other terminals can be put in a mode where keys with modifiers
are sent with a special escape code. Vim recognizes these codes and can then
Expand Down Expand Up @@ -1046,7 +1058,7 @@ When the 'esckeys' option is off, then modifyOtherKeys will be disabled in
Insert mode to avoid every key with a modifier causing Insert mode to end.


1.13 MAPPING WITH KITTY KEYBOARD PROTOCOL *kitty-keyboard-protocol*
1.14 MAPPING WITH KITTY KEYBOARD PROTOCOL *kitty-keyboard-protocol*

If the value of 'term' contains "kitty" then Vim will send out an escape
sequence to enable the Kitty keyboard protocol. This can be changed with the
Expand All @@ -1073,7 +1085,7 @@ translated). The meaning of {value}:
previous state is unknown


1.14 MAPPING AN OPERATOR *:map-operator*
1.15 MAPPING AN OPERATOR *:map-operator*

An operator is used before a {motion} command. To define your own operator
you must create a mapping that first sets the 'operatorfunc' option and then
Expand Down Expand Up @@ -1629,6 +1641,7 @@ completion can be enabled:
-complete=help help subjects
-complete=highlight highlight groups
-complete=history :history suboptions
-complete=keymap keyboard mappings
-complete=locale locale names (as output of locale -a)
-complete=mapclear buffer argument
-complete=mapping mapping name
Expand Down