Skip to content

Commit e008806

Browse files
authored
Merge pull request #285 from mnishz/term_for_Vim_8.1
Update term from Vim 8.0 to 8.1
2 parents 994dcd5 + 1b494d9 commit e008806

File tree

2 files changed

+87
-11
lines changed

2 files changed

+87
-11
lines changed

doc/term.jax

+44-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*term.txt* For Vim バージョン 8.0. Last change: 2017 Feb 02
1+
*term.txt* For Vim バージョン 8.1. Last change: 2017 Oct 14
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -109,6 +109,16 @@ termcap のコードが有効になり、カーソルキーとファンクショ
109109
もし Vim の実行中にこれを実行した場合、bracketed paste を無効化するため 't_BD'
110110
が端末に送信されます。
111111

112+
端末が bracketed paste をサポートしているにもかかわらずオプションが自動的に設
113+
定されない場合、以下のような設定を試すことができます: >
114+
115+
if &term =~ "screen"
116+
let &t_BE = "\e[?2004h"
117+
let &t_BD = "\e[?2004l"
118+
exec "set t_PS=\e[200~"
119+
exec "set t_PE=\e[201~"
120+
endif
121+
<
112122
*cs7-problem*
113123
Note: Vim を起動した後で端末の設定を変えると、設定が一貫しない状態になるかもし
114124
れません。Solaris 2.5 で "stty cs8 parenb" が "stty cs7 parenb" に復元されてし
@@ -295,13 +305,11 @@ termcap コードに対応するオプションを設定することによって
295305
t_ts (ステータスラインに)ウィンドウタイトル設定開始 *t_ts* *'t_ts'*
296306
t_ue 下線終了 *t_ue* *'t_ue'*
297307
t_us 下線モード *t_us* *'t_us'*
298-
t_Ce 下波線終了 *t_Ce* *'t_Ce'*
299-
t_Cs 下波線モード *t_Cs* *'t_Cs'*
300308
t_ut 現在の背景色を使ってクリア *t_ut* *'t_ut'*
301309
t_vb ビジュアルベル *t_vb* *'t_vb'*
302310
t_ve カーソル表示 *t_ve* *'t_ve'*
303311
t_vi カーソル非表示 *t_vi* *'t_vi'*
304-
t_vs カーソル強調表示 *t_vs* *'t_vs'*
312+
t_vs カーソル強調表示 (点滅) *t_vs* *'t_vs'*
305313
*t_xs* *'t_xs'*
306314
t_xs 空でない場合は強調が上書きによって消されない(hpterm)
307315
*t_xn* *'t_xn'*
@@ -311,10 +319,16 @@ termcap コードに対応するオプションを設定することによって
311319
t_ZR 斜体終了 *t_ZR* *'t_ZR'*
312320

313321
Vim 独自のもの (標準的なコードはないもの):
322+
t_Ce 下波線終了 *t_Ce* *'t_Ce'*
323+
t_Cs 下波線モード *t_Cs* *'t_Cs'*
324+
t_Te 取り消し線終了 *t_Te* *'t_Te'*
325+
t_Ts 取り消し線モード *t_Ts* *'t_Ts'*
314326
t_IS アイコンテキスト設定開始 *t_IS* *'t_IS'*
315327
t_IE アイコンテキスト設定終了 *t_IE* *'t_IE'*
316328
t_WP ウィンドウ位置 (Y, X) をピクセルで指定 *t_WP* *'t_WP'*
317-
t_WS ウィンドウサイズ (height, width) を文字数で指定 *t_WS* *'t_WS'*
329+
t_GP ウィンドウ位置 (Y, X) をピクセルで取得 *t_GP* *'t_GP'*
330+
t_WS ウィンドウサイズ (height, width のセル数) を指定 *t_WS* *'t_WS'*
331+
t_VS カーソル通常表示 (点滅なし) *t_VS* *'t_VS'*
318332
t_SI 挿入モード開始 (バー型のカーソル) *t_SI* *'t_SI'*
319333
t_SR 置換モードの開始 (下線型のカーソル) *t_SR* *'t_SR'*
320334
t_EI 挿入または置換モード終了(ブロック型カーソル) *t_EI* *'t_EI'*
@@ -323,15 +337,39 @@ Vim 独自のもの (標準的なコードはないもの):
323337
|xterm-8bit| |v:termresponse| |'ttymouse'| |xterm-codes|
324338
t_u7 カーソル位置を要求 (xterm 用) *t_u7* *'t_u7'*
325339
|'ambiwidth'| 参照
340+
t_RF 端末の文字色を要求 *t_RF* *'t_RF'*
326341
t_RB 端末の背景色を要求 *t_RB* *'t_RB'*
327-
t_8f 前景色を設定する (R, G, B) *t_8f* *'t_8f'*
342+
t_8f 文字色を設定する (R, G, B) *t_8f* *'t_8f'*
328343
|xterm-true-color|
329344
t_8b 背景色を設定する (R, G, B) *t_8b* *'t_8b'*
330345
|xterm-true-color|
331346
t_BE bracketed paste モードを有効化する *t_BE* *'t_BE'*
332347
|xterm-bracketed-paste|
333348
t_BD bracketed paste モードを無効化する *t_BD* *'t_BD'*
334349
|xterm-bracketed-paste|
350+
t_SC カーソル色開始を設定 *t_SC* *'t_SC'*
351+
t_EC カーソル色終了を設定 *t_EC* *'t_EC'*
352+
t_SH カーソルの形状を設定 *t_SH* *'t_SH'*
353+
t_RC 端末カーソルの点滅を要求 *t_RC* *'t_RC'*
354+
t_RS 端末カーソルの形状を要求 *t_RS* *'t_RS'*
355+
356+
いくつかのコードは、開始、中間および終了部分を持ちます。開始と終了はオプション
357+
termcap で定義され、中間部分はテキストです。
358+
set title text: t_ts {title text} t_fs
359+
set icon text: t_IS {icon text} t_IE
360+
set cursor color: t_SC {color name} t_EC
361+
362+
t_SH は 1 つの引数を取らなければなりません:
363+
0, 1 もしくは無し 点滅する矩形カーソル
364+
2 矩形カーソル
365+
3 点滅する下線カーソル
366+
4 下線カーソル
367+
5 点滅する垂直バーカーソル
368+
6 垂直バーカーソル
369+
370+
t_RS は、t_RV に対する応答を受け取った場合のみ送られます。termresponse から
371+
Terminal.app が認識され得る場合、Mac OS 上では使われません。
372+
335373

336374
キーコード *terminal-key-codes*
337375
Note: 可能なかぎり <> 形式を使ってください。

en/term.txt

+43-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*term.txt* For Vim version 8.0. Last change: 2017 Feb 02
1+
*term.txt* For Vim version 8.1. Last change: 2017 Oct 14
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -111,6 +111,16 @@ have a problem with this, disable bracketed paste by putting this in your
111111
If this is done while Vim is running the 't_BD' will be sent to the terminal
112112
to disable bracketed paste.
113113

114+
If your terminal supports bracketed paste, but the options are not set
115+
automatically, you can try using something like this: >
116+
117+
if &term =~ "screen"
118+
let &t_BE = "\e[?2004h"
119+
let &t_BD = "\e[?2004l"
120+
exec "set t_PS=\e[200~"
121+
exec "set t_PE=\e[201~"
122+
endif
123+
<
114124
*cs7-problem*
115125
Note: If the terminal settings are changed after running Vim, you might have
116126
an illegal combination of settings. This has been reported on Solaris 2.5
@@ -295,13 +305,11 @@ OUTPUT CODES *terminal-output-codes*
295305
t_ts set window title start (to status line) *t_ts* *'t_ts'*
296306
t_ue underline end *t_ue* *'t_ue'*
297307
t_us underline mode *t_us* *'t_us'*
298-
t_Ce undercurl end *t_Ce* *'t_Ce'*
299-
t_Cs undercurl mode *t_Cs* *'t_Cs'*
300308
t_ut clearing uses the current background color *t_ut* *'t_ut'*
301309
t_vb visual bell *t_vb* *'t_vb'*
302310
t_ve cursor visible *t_ve* *'t_ve'*
303311
t_vi cursor invisible *t_vi* *'t_vi'*
304-
t_vs cursor very visible *t_vs* *'t_vs'*
312+
t_vs cursor very visible (blink) *t_vs* *'t_vs'*
305313
*t_xs* *'t_xs'*
306314
t_xs if non-empty, standout not erased by overwriting (hpterm)
307315
*t_xn* *'t_xn'*
@@ -311,10 +319,16 @@ OUTPUT CODES *terminal-output-codes*
311319
t_ZR italics end *t_ZR* *'t_ZR'*
312320

313321
Added by Vim (there are no standard codes for these):
322+
t_Ce undercurl end *t_Ce* *'t_Ce'*
323+
t_Cs undercurl mode *t_Cs* *'t_Cs'*
324+
t_Te strikethrough end *t_Te* *'t_Te'*
325+
t_Ts strikethrough mode *t_Ts* *'t_Ts'*
314326
t_IS set icon text start *t_IS* *'t_IS'*
315327
t_IE set icon text end *t_IE* *'t_IE'*
316328
t_WP set window position (Y, X) in pixels *t_WP* *'t_WP'*
317-
t_WS set window size (height, width) in characters *t_WS* *'t_WS'*
329+
t_GP get window position (Y, X) in pixels *t_GP* *'t_GP'*
330+
t_WS set window size (height, width in cells) *t_WS* *'t_WS'*
331+
t_VS cursor normally visible (no blink) *t_VS* *'t_VS'*
318332
t_SI start insert mode (bar cursor shape) *t_SI* *'t_SI'*
319333
t_SR start replace mode (underline cursor shape) *t_SR* *'t_SR'*
320334
t_EI end insert or replace mode (block cursor shape) *t_EI* *'t_EI'*
@@ -323,6 +337,7 @@ Added by Vim (there are no standard codes for these):
323337
|xterm-8bit| |v:termresponse| |'ttymouse'| |xterm-codes|
324338
t_u7 request cursor position (for xterm) *t_u7* *'t_u7'*
325339
see |'ambiwidth'|
340+
t_RF request terminal foreground color *t_RF* *'t_RF'*
326341
t_RB request terminal background color *t_RB* *'t_RB'*
327342
t_8f set foreground color (R, G, B) *t_8f* *'t_8f'*
328343
|xterm-true-color|
@@ -332,6 +347,29 @@ Added by Vim (there are no standard codes for these):
332347
|xterm-bracketed-paste|
333348
t_BD disable bracketed paste mode *t_BD* *'t_BD'*
334349
|xterm-bracketed-paste|
350+
t_SC set cursor color start *t_SC* *'t_SC'*
351+
t_EC set cursor color end *t_EC* *'t_EC'*
352+
t_SH set cursor shape *t_SH* *'t_SH'*
353+
t_RC request terminal cursor blinking *t_RC* *'t_RC'*
354+
t_RS request terminal cursor style *t_RS* *'t_RS'*
355+
356+
Some codes have a start, middle and end part. The start and end are defined
357+
by the termcap option, the middle part is text.
358+
set title text: t_ts {title text} t_fs
359+
set icon text: t_IS {icon text} t_IE
360+
set cursor color: t_SC {color name} t_EC
361+
362+
t_SH must take one argument:
363+
0, 1 or none blinking block cursor
364+
2 block cursor
365+
3 blinking underline cursor
366+
4 underline cursor
367+
5 blinking vertical bar cursor
368+
6 vertical bar cursor
369+
370+
t_RS is sent only if the response to t_RV has been received. It is not used
371+
on Mac OS when Terminal.app could be recognized from the termresponse.
372+
335373

336374
KEY CODES *terminal-key-codes*
337375
Note: Use the <> form if possible

0 commit comments

Comments
 (0)