Skip to content
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
13 changes: 7 additions & 6 deletions doc/terminal.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*terminal.txt* For Vim バージョン 9.1. Last change: 2025 Feb 13
*terminal.txt* For Vim バージョン 9.1. Last change: 2025 Feb 22


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -1075,11 +1075,12 @@ Vim からジョブへ: term_sendkeys() ~
JSONでの例: >
["drop", "path/file.txt", {"ff": "dos"}]
Vimにこのエスケープシーケンスを送信させるトリック: >
exe "set t_ts=\<Esc>]51; t_fs=\x07"
let &titlestring = '["call","Tapi_TryThis",["hello",123]]'
redraw
set t_ts& t_fs&
|echoraw()| を使用すると、Vim にこのエスケープシーケンスを送信させることができ
る: >
call echoraw("\<ESC>]51;[\"call\", \"Tapi_TryThis\", [\"hello\", 123]]\x07")
call echoraw("\<Esc>]51;[\"drop\", \"README.md\"]\x07")
Note: JSON では文字列値をダブルクォートで囲む必要があるため、エスケープする必
要がある。

理論的根拠: コマンドや式を許可しないのはなぜか? セキュリティ上の問題が生じる
可能性があるため。
Expand Down
12 changes: 6 additions & 6 deletions en/terminal.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 9.1. Last change: 2025 Feb 13
*terminal.txt* For Vim version 9.1. Last change: 2025 Feb 22


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -1092,11 +1092,11 @@ Currently supported commands:
Example in JSON: >
["drop", "path/file.txt", {"ff": "dos"}]

A trick to have Vim send this escape sequence: >
exe "set t_ts=\<Esc>]51; t_fs=\x07"
let &titlestring = '["call","Tapi_TryThis",["hello",123]]'
redraw
set t_ts& t_fs&
You can use |echoraw()| to make Vim send this escape sequence: >
call echoraw("\<ESC>]51;[\"call\", \"Tapi_TryThis\", [\"hello\", 123]]\x07")
call echoraw("\<Esc>]51;[\"drop\", \"README.md\"]\x07")
Note: JSON requires double quotes around string values, hence those have to be
escaped.

Rationale: Why not allow for any command or expression? Because that might
create a security problem.
Expand Down