Skip to content

Commit 777d97b

Browse files
authored
Merge pull request #1842 from h-east/update-various
Update various.{txt,jax}
2 parents 73e9c44 + 5efed29 commit 777d97b

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

doc/various.jax

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*various.txt* For Vim バージョン 9.1. Last change: 2024 Nov 12
1+
*various.txt* For Vim バージョン 9.1. Last change: 2024 Nov 23
22

33

44
VIM リファレンスマニュアル by Bram Moolenaar
@@ -257,6 +257,17 @@ g8 カーソル位置の文字のバイト列を 16 進数で表示します
257257
*:!cmd* *:!*
258258
:!{cmd} シェルで {cmd} を実行します。'shell''shelltype'
259259
参照。フィルターコマンドについては、|:range!| を参照。
260+
261+
Vim は、オプション 'shell''shcf''sxq''shq' を使
262+
用して、次の順序でコマンドラインを構築する:
263+
`&sh &shcf &sxq &shq {cmd} &shq &sxq`
264+
したがって、'sxq''shq' の両方を設定することは可能
265+
だが、ほとんど役に立たない。`{cmd}` 内の追加のエスケー
266+
プは、'sxe' オプションによるものである可能性もある。
267+
268+
また、{cmd} 内のすべての |cmdline-special| 文字は、シェ
269+
ルに渡される前に Vim によって置き換えられる。
270+
260271
*E34*
261272
{cmd} の中の '!' は以前使用した外部プログラムに置
262273
き換えられます ('cpoptions' も参照)。'!' の前にバック
@@ -310,7 +321,11 @@ g8 カーソル位置の文字のバイト列を 16 進数で表示します
310321
かを出力した場合は CTRL-L や ":redraw!" で再描画できま
311322
す。しかし、これは termcap の |t_ti||t_te| のエン
312323
トリに何が設定されているかに依存します。
313-
|shell-window|も参照。
324+
325+
ヒント: Vim ウィンドウで {cmd} を実行する場合は、
326+
|:terminal| コマンドを使用する。
327+
`:term ++shell ++close {cmd}` は、`:!{cmd}` の機能に近
328+
いものになる。
314329

315330
*:!!*
316331
:!! 最後の ":!{cmd}" を繰り返します。

en/various.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*various.txt* For Vim version 9.1. Last change: 2024 Nov 12
1+
*various.txt* For Vim version 9.1. Last change: 2024 Nov 23
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -256,6 +256,17 @@ g8 Print the hex values of the bytes used in the
256256
:!{cmd} Execute {cmd} with the shell. See also the 'shell'
257257
and 'shelltype' option. For the filter command, see
258258
|:range!|.
259+
260+
Vim builds command line using options 'shell', 'shcf',
261+
'sxq' and 'shq' in the following order:
262+
`&sh &shcf &sxq &shq {cmd} &shq &sxq`
263+
So setting both 'sxq' and 'shq' is possible but rarely
264+
useful. Additional escaping inside `{cmd}` may also
265+
be due to 'sxe' option.
266+
267+
Also, all |cmdline-special| characters in {cmd} are
268+
replaced by Vim before passing them to shell.
269+
259270
*E34*
260271
Any '!' in {cmd} is replaced with the previous
261272
external command (see also 'cpoptions'). But not when
@@ -306,7 +317,10 @@ g8 Print the hex values of the bytes used in the
306317
CTRL-L or ":redraw!" if the command did display
307318
something. However, this depends on what the |t_ti|
308319
and |t_te| termcap entries are set to.
309-
Also see |shell-window|.
320+
321+
Hint: use |:terminal| command if you want to run {cmd}
322+
in Vim window. `:term ++shell ++close {cmd}` could
323+
serve as close approximation to what `:!{cmd}` does.
310324

311325
*:!!*
312326
:!! Repeat last ":!{cmd}".

0 commit comments

Comments
 (0)