Skip to content

Commit 237fce5

Browse files
authored
Merge pull request #493 from vim-jp/update_options
Update options documents
2 parents c09ba39 + c34f1ab commit 237fce5

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

doc/options.jax

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim バージョン 8.1. Last change: 2019 Mar 08
1+
*options.txt* For Vim バージョン 8.1. Last change: 2019 Mar 24
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -2582,8 +2582,16 @@ Note 1番目の形式では、行全体がオプション指定に使われる
25822582
既定値はCプログラム用である。C++プログラムには、定数定義を加えて次のよ
25832583
うにすると便利だろう。 >
25842584
^\(#\s*define\|[a-z]*\s*const\s*[a-z]*\)
2585+
< 名前の直前に "\ze" を使用し、何が続くか確認するためのパターンを続ける
2586+
こともできる。Javascript の例、関数が "func_name = function(args)" で
2587+
定義されている場合: >
2588+
^\s*\ze\i\+\s*=\s*function(
2589+
< 関数が "func_name : function() {..." で定義されている場合: >
2590+
^\s*\ze\i\+\s*[:]\s*(*function\s*(
25852591
< ":set" で設定するときは、'\' の数を2倍にする必要がある!
2586-
2592+
これを回避するには、`:let` とシングルクォートの文字列を使用する: >
2593+
let &l:define = '^\s*\ze\k\+\s*=\s*function('
2594+
<
25872595
*'delcombine'* *'deco'* *'nodelcombine'* *'nodeco'*
25882596
'delcombine' 'deco' 切替 (既定ではオフ)
25892597
グローバル
@@ -7780,7 +7788,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる
77807788
示するときに、バッファを読み込む前にカレントウィンドウ
77817789
を分割する。
77827790
含まれていないときは、分割はされない。カレントウィンド
7783-
ウが使われる。
7791+
ウが使われる (quickfix ウィンドウで使用されたとき: 前
7792+
に使われていたウィンドウ、もしくは他のウィンドウがない
7793+
場合は分割する)。
77847794
vsplit "split" と同様だが、垂直に分割する。
77857795
newtab "split" と同様だが、新しいタブページを開く。"split" と
77867796
両方指定された場合はこちらが優先される。

en/options.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 8.1. Last change: 2019 Mar 08
1+
*options.txt* For Vim version 8.1. Last change: 2019 Mar 24
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2538,7 +2538,15 @@ A jump table for the options with a short description can be found at |Q_op|.
25382538
The default value is for C programs. For C++ this value would be
25392539
useful, to include const type declarations: >
25402540
^\(#\s*define\|[a-z]*\s*const\s*[a-z]*\)
2541+
< You can also use "\ze" just before the name and continue the pattern
2542+
to check what is following. E.g. for Javascript, if a function is
2543+
defined with "func_name = function(args)": >
2544+
^\s*\ze\i\+\s*=\s*function(
2545+
< If the function is defined with "func_name : function() {...": >
2546+
^\s*\ze\i\+\s*[:]\s*(*function\s*(
25412547
< When using the ":set" command, you need to double the backslashes!
2548+
To avoid that use `:let` with a single quote string: >
2549+
let &l:define = '^\s*\ze\k\+\s*=\s*function('
25422550
25432551
*'delcombine'* *'deco'* *'nodelcombine'* *'nodeco'*
25442552
'delcombine' 'deco' boolean (default off)
@@ -7682,7 +7690,9 @@ A jump table for the options with a short description can be found at |Q_op|.
76827690
pages.
76837691
split If included, split the current window before loading
76847692
a buffer for a |quickfix| command that display errors.
7685-
Otherwise: do not split, use current window.
7693+
Otherwise: do not split, use current window (when used
7694+
in the quickfix window: the previously used window or
7695+
split if there is no other window).
76867696
vsplit Just like "split" but split vertically.
76877697
newtab Like "split", but open a new tab page. Overrules
76887698
"split" when both are present.

0 commit comments

Comments
 (0)