Skip to content

Commit c8a30b2

Browse files
committed
Update for 8.0.0257
(Work in progress.)
1 parent 988136e commit c8a30b2

16 files changed

+315
-41
lines changed

doc/eval.jax

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim バージョン 8.0. Last change: 2017 Jan 14
1+
*eval.txt* For Vim バージョン 8.0. Last change: 2017 Jan 28
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -2186,8 +2186,8 @@ matchstr({expr}, {pat}[, {start}[, {count}]])
21862186
文字列 {expr}内の{count}番目の{pat}のマッチ
21872187
matchstrpos({expr}, {pat}[, {start}[, {count}]])
21882188
リスト {expr}内の{count}番目の{pat}のマッチ
2189-
max({list}) 数値 {list}内の要素の最大値
2190-
min({list}) 数値 {list}内の要素の最小値
2189+
max({expr}) 数値 {expr}内の要素の最大値
2190+
min({expr}) 数値 {expr}内の要素の最小値
21912191
mkdir({name} [, {path} [, {prot}]])
21922192
数値 ディレクトリ{name}を作成
21932193
mode([expr]) 文字列 現在の編集モード
@@ -2203,6 +2203,7 @@ printf({fmt}, {expr1}...) 文字列 文字列を組み立てる
22032203
pumvisible() 数値 ポップアップメニューが表示されているか
22042204
pyeval({expr}) 任意 |Python| の式を評価する
22052205
py3eval({expr}) 任意 |python3| の式を評価する
2206+
pyxeval({expr}) 任意 |python_x| の式を評価する
22062207
range({expr} [, {max} [, {stride}]])
22072208
リスト {expr}から{max}までの要素のリスト
22082209
readfile({fname} [, {binary} [, {max}]])
@@ -4100,6 +4101,10 @@ getchar([expr]) *getchar()*
41004101
exe "normal " . v:mouse_col . "|"
41014102
endif
41024103
<
4104+
When using bracketed paste only the first character is
4105+
returned, the rest of the pasted text is dropped.
4106+
|xterm-bracketed-paste|.
4107+
41034108
この関数を呼んだときプロンプトは表示されない。文字入力を待って
41044109
いることをなんらかの方法でユーザーがわかるようにしなければなら
41054110
ないだろう。
@@ -5661,16 +5666,20 @@ matchstrpos({expr}, {pat}[, {start}[, {count}]]) *matchstrpos()*
56615666
型は変更されない。必ずしも文字列である必要はない。
56625667

56635668
*max()*
5664-
max({list}) {list}の全要素の値の最大値を返す。
5665-
{list}がリストでなかったり、要素のどれかが数値に変換できない場
5666-
合はエラーとなる。
5667-
空リストの場合は0を返す。
5669+
max({expr}) {expr}の全要素の値の最大値を返す。
5670+
{expr}はリストか辞書である。辞書の場合、辞書に含まれるすべての
5671+
値の最大値を返す。
5672+
{expr}がリストでも辞書でもなかったり、要素のどれかが数値に変換
5673+
できない場合はエラーとなる。
5674+
空のリストまたは辞書の場合は0を返す。
56685675

56695676
*min()*
5670-
min({list}) {list}の全要素の値の最小値を返す。
5671-
{list}がリストでなかったり、要素のどれかが数値に変換できない場
5672-
合はエラーとなる。
5673-
空リストの場合は0を返す。
5677+
min({expr}) {expr}の全要素の値の最小値を返す。
5678+
{expr}はリストか辞書である。辞書の場合、辞書に含まれるすべての
5679+
値の最小値を返す。
5680+
{expr}がリストでも辞書でもなかったり、要素のどれかが数値に変換
5681+
できない場合はエラーとなる。
5682+
空のリストまたは辞書の場合は0を返す。
56745683

56755684
*mkdir()* *E739*
56765685
mkdir({name} [, {path} [, {prot}]])
@@ -5997,6 +6006,14 @@ pyeval({expr}) *pyeval()*
59976006
のキーはエラーになる。
59986007
{|+python| 機能付きでコンパイルされたときのみ利用可能}
59996008

6009+
pyxeval({expr}) *pyxeval()*
6010+
Evaluate Python expression {expr} and return its result
6011+
converted to Vim data structures.
6012+
Uses Python 2 or 3, see |python_x| and 'pyxversion'.
6013+
See also: |pyeval()|, |py3eval()|
6014+
{only available when compiled with the |+python| or the
6015+
|+python3| feature}
6016+
60006017
*E726* *E727*
60016018
range({expr} [, {max} [, {stride}]]) *range()*
60026019
以下のような数値のリスト|List|を返す。
@@ -6588,10 +6605,17 @@ setpos({expr}, {list})
65886605
[bufnum, lnum, col, off]
65896606
[bufnum, lnum, col, off, curswant]
65906607

6591-
"bufnum" はバッファ番号。0にするとカレントバッファを表す。カー
6608+
"bufnum" はバッファ番号。0にするとカレントバッファを表す。
6609+
{旧訳: カー
65926610
ソル位置の設定はカレントバッファに対してのみ可能。他のバッファ
65936611
のマークを設定するには、関数|bufnr()|を使ってファイル名をバッ
6594-
ファ番号に変換する。
6612+
ファ番号に変換する。}
6613+
When setting an uppercase mark "bufnum" is
6614+
used for the mark position. For other marks it specifies the
6615+
buffer to set the mark in. You can use the |bufnr()| function
6616+
to turn a file name into a buffer number.
6617+
For setting the cursor and the ' mark "bufnum" is ignored,
6618+
since these are associated with a window, not a buffer.
65956619
ジャンプリストは変更されない。
65966620

65976621
"lnum" と "col" はバッファ内の位置。桁番号は1から始まる。
@@ -7885,7 +7909,7 @@ winnr([{arg}]) 結果は現在のウィンドウを示す数値。最上位の
78857909
以前のウィンドウがない場合、またはそれが他のタブページにある場
78867910
合は0を返す。
78877911
この番号は|CTRL-W_w|と ":wincmd w" で使える。|:wincmd|
7888-
|tabpagewinnr()|も参照。
7912+
|tabpagewinnr()||win_getid()|も参照。
78897913

78907914
*winrestcmd()*
78917915
winrestcmd() 現在のウィンドウサイズを復元するための一連の|:resize|コマンド
@@ -8137,6 +8161,7 @@ printer |:hardcopy| をサポート
81378161
profile |:profile| をサポート
81388162
python Python 2.x インターフェイスをサポート |has-python|
81398163
python3 Python 3.x インターフェイスをサポート |has-python|
8164+
pythonx |python_x| インターフェイスをサポート |has-pythonx|
81408165
qnx QNXバージョン
81418166
quickfix |quickfix|をサポート
81428167
reltime |reltime()|をサポート

doc/if_pyth.jax

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*if_pyth.txt* For Vim バージョン 8.0. Last change: 2016 Sep 17
1+
*if_pyth.txt* For Vim バージョン 8.0. Last change: 2017 Jan 28
22

33

44
VIMリファレンスマニュアル by Paul Moore
@@ -16,6 +16,7 @@ VimのPythonインターフェイス *python* *Python*
1616
8. Vim 関数 pyeval() と py3eval() |python-pyeval|
1717
9. 動的ローディング |python-dynamic|
1818
10. Python 3 |python3|
19+
11. Python X |python_x|
1920

2021
{Vi にはこれらのコマンドはありません}
2122

@@ -699,6 +700,7 @@ vim.Function オブジェクト *python-Function*
699700

700701
双方向インターフェイスを容易にするため、|pyeval()| 関数と |py3eval()| 関数を
701702
使って Python の式を評価して、その値を VimL に渡すことができます。
703+
|pyxeval()| も使用可能です。
702704

703705
==============================================================================
704706
9. 動的ローディング *python-dynamic*
@@ -802,5 +804,69 @@ Note: Python の 2 と 3 の両方が利用可能で、Python が動的ロード
802804
ロードできるのがどちらか一方だけだった場合、Python の 2 と 3 のどちらが利用で
803805
きるか調べるだけで、もう一方は利用できなくなります。
804806

807+
==============================================================================
808+
11. Python X *python_x* *pythonx*
809+
810+
Because most python code can be written so that it works with python 2.6+ and
811+
python 3 the pyx* functions and commands have been writen. They work exactly
812+
the same as the Python 2 and 3 variants, but select the Python version using
813+
the 'pyxversion' setting.
814+
815+
You should set 'pyxversion' in your |.vimrc| to prefer Python 2 or Python 3
816+
for Python commands. If you change this setting at runtime you may risk that
817+
state of plugins (such as initialization) may be lost.
818+
819+
If you want to use a module, you can put it in the {rtp}/pythonx directory.
820+
See |pythonx-directory|.
821+
822+
*:pyx* *:pythonx*
823+
The `:pyx` and `:pythonx` commands work similar to `:python`. A simple check
824+
if the `:pyx` command is working: >
825+
:pyx print("Hello")
826+
827+
To see what version of Python is being used: >
828+
:pyx import sys
829+
:pyx print(sys.version)
830+
<
831+
*:pyxfile* *python_x-special-comments*
832+
The `:pyxfile` command works similar to `:pyfile`. However you can add one of
833+
these comments to force Vim using `:pyfile` or `:py3file`: >
834+
#!/any string/python2 " Shebang. Must be the first line of the file.
835+
#!/any string/python3 " Shebang. Must be the first line of the file.
836+
# requires python 2.x " Maximum lines depend on 'modelines'.
837+
# requires python 3.x " Maximum lines depend on 'modelines'.
838+
Unlike normal modelines, the bottom of the file is not checked.
839+
If none of them are found, the 'pyxversion' setting is used.
840+
*W20* *W21*
841+
If Vim does not support the selected Python version a silent message will be
842+
printed. Use `:messages` to read them.
843+
844+
*:pyxdo*
845+
The `:pyxdo` command works similar to `:pydo`.
846+
847+
*has-pythonx*
848+
You can test if pyx* commands are available with: >
849+
if has('pythonx')
850+
echo 'pyx* commands are available. (Python ' . &pyx . ')'
851+
endif
852+
853+
When compiled with only one of |+python| or |+python3|, the has() returns 1.
854+
When compiled with both |+python| and |+python3|, the test depends on the
855+
'pyxversion' setting. If 'pyxversion' is 0, it tests Python 3 first, and if
856+
it is not available then Python 2. If 'pyxversion' is 2 or 3, it tests only
857+
Python 2 or 3 respectively.
858+
859+
Note that for has('pythonx') to work it may try to dynamically load Python 3
860+
or 2. This may have side effects, especially when Vim can only load one of
861+
the two.
862+
863+
If a user prefers Python 2 and want to fallback to Python 3, he needs to set
864+
'pyxversion' explicitly in his |.vimrc|. E.g.: >
865+
if has('python')
866+
set pyx=2
867+
elseif has('python3')
868+
set pyx=3
869+
endif
870+
805871
==============================================================================
806872
vim:tw=78:ts=8:ft=help:norl:

doc/index.jax

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,6 +1494,10 @@ Note: 1 = カーソル移動コマンド 2 = アンドゥ/リドゥ可能
14941494
|:python| :py[thon] Python コマンドを実行
14951495
|:pydo| :pyd[o] 各行に対して Python コマンドを実行
14961496
|:pyfile| :pyf[ile] Python スクリプトファイルを実行
1497+
|:pyx| :pyx |python_x| コマンドを実行
1498+
|:pythonx| :pythonx :pyx と同じ
1499+
|:pyxdo| :pyxd[o] 各行に対して |python_x| コマンドを実行
1500+
|:pyxfile| :pyxf[ile] |python_x| スクリプトファイルを実行
14971501
|:quit| :q[uit] カレントウィンドウを閉じる(ウィンドウが1つなら
14981502
Vim を終了)
14991503
|:quitall| :quita[ll] Vim を終了

doc/options.jax

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim バージョン 8.0. Last change: 2017 Jan 15
1+
*options.txt* For Vim バージョン 8.0. Last change: 2017 Jan 28
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -5905,6 +5905,34 @@ Note 1番目の形式では、行全体がオプション指定に使われる
59055905
このオプションはセキュリティの理由により |modeline| や |sandbox| から
59065906
は設定できない。
59075907

5908+
*'pyxversion'* *'pyx'*
5909+
'pyxversion' 'pyx' number (default depends on the build)
5910+
global
5911+
{not in Vi}
5912+
{only available when compiled with the |+python| or
5913+
the |+python3| feature}
5914+
Specifies the python version used for pyx* functions and commands
5915+
|python_x|. The default value is as follows:
5916+
5917+
Compiled with Default ~
5918+
|+python| and |+python3| 0
5919+
only |+python| 2
5920+
only |+python3| 3
5921+
5922+
Available values are 0, 2 and 3.
5923+
If 'pyxversion' is 0, it is set to 2 or 3 after the first execution of
5924+
any python2/3 commands or functions. E.g. `:py` sets to 2, and `:py3`
5925+
sets to 3. `:pyx` sets it to 3 if Python 3 is available, otherwise sets
5926+
to 2 if Python 2 is available.
5927+
See also: |has-pythonx|
5928+
5929+
If Vim is compiled with only |+python| or |+python3| setting
5930+
'pyxversion' has no effect. The pyx* functions and commands are
5931+
always the same as the compiled version.
5932+
5933+
This option cannot be set from a |modeline| or in the |sandbox|, for
5934+
security reasons.
5935+
59085936
*'quoteescape'* *'qe'*
59095937
'quoteescape' 'qe' 文字列 (既定では "\")
59105938
バッファについてローカル

doc/quickref.jax

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,7 @@
852852
'prompt' 'prompt' Ex モードでプロンプトを有効にする
853853
'pythondll' Python 2 動的ライブラリの名前
854854
'pythonthreedll' Python 3 動的ライブラリの名前
855+
'pyxversion' 'pyx' pyx* コマンドに使用される Python のバージョン
855856
'quoteescape' 'qe' 文字列中に使われるエスケープ文字
856857
'readonly' 'ro' バッファの書き込みを制限する
857858
'redrawtime' 'rdt' 'hlsearch'|:match| のハイライトのタイムアウト

doc/syntax.jax

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim バージョン 8.0. Last change: 2016 Oct 30
1+
*syntax.txt* For Vim バージョン 8.0. Last change: 2017 Jan 17
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -3358,6 +3358,8 @@ ZSH *zsh.vim* *ft-zsh-syntax*
33583358
前の要素には影響せず、次の ":syntax case" コマンドまでのすべての要素に
33593359
影響する。
33603360

3361+
:sy[ntax] case
3362+
Show either "syntax case match" or "syntax case ignore" (translated).
33613363

33623364
スペルチェック *:syn-spell*
33633365

@@ -3376,6 +3378,11 @@ ZSH *zsh.vim* *ft-zsh-syntax*
33763378
スペルチェックを有効化するにはオプション 'spell' をオンにしなければな
33773379
らない。
33783380

3381+
:sy[ntax] spell
3382+
Show either "syntax spell toplevel", "syntax spell notoplevel" or
3383+
"syntax spell default" (translated).
3384+
3385+
33793386
SYNTAX ISKEYWORD SETTING *:syn-iskeyword*
33803387

33813388
:sy[ntax] iskeyword [clear | {option}]
@@ -3939,6 +3946,9 @@ Note この例はネストした "if" には機能しないことに注意。ネ
39393946
実行することで通常の状態、つまり "conceal" フラグを明示的に設定しなけ
39403947
ればならない状態に戻る。
39413948

3949+
:sy[ntax] conceal
3950+
Show either "syntax conceal on" or "syntax conceal off" (translated).
3951+
39423952
==============================================================================
39433953
7. syntaxのパターン *:syn-pattern* *E401* *E402*
39443954

doc/term.jax

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*term.txt* For Vim バージョン 8.0. Last change: 2016 Sep 02
1+
*term.txt* For Vim バージョン 8.0. Last change: 2017 Jan 27
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -98,7 +98,11 @@ termcap のコードが有効になり、カーソルキーとファンクショ
9898
いくつかの状況では、Vim は bracketed paste を認識せず、生のテキストが取得され
9999
る場合があることに注意してください。別のいくつかの状況では Vim はペーストされ
100100
た最初の文字のみを取得し、残りは切り捨てられます。例: "r" コマンドを使った場
101-
合。
101+
合。bracketed paste で何か問題がある場合、.vimrc に以下を書くことで無効化する
102+
ことができます: >
103+
set t_BE=
104+
もし Vim の実行中にこれを実行した場合、bracketed paste を無効化するため 't_BD'
105+
が端末に送信されます。
102106

103107
*cs7-problem*
104108
Note: Vim を起動した後で端末の設定を変えると、設定が一貫しない状態になるかもし

doc/usr_41.jax

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,7 @@ Timers: *timer-functions*
978978
perleval() |Perl|の式を評価する (|+perl|)
979979
py3eval() |Python|の式を評価する (|+python3|)
980980
pyeval() |Python|の式を評価する (|+python|)
981+
pyxeval() |python_x| の式を評価する
981982

982983
==============================================================================
983984
*41.7* 関数を定義する

0 commit comments

Comments
 (0)