|
1 | | -*options.txt* For Vim version 7.0aa. Last change: 2004 Jun 28 |
| 1 | +*options.txt* For Vim version 7.0aa. Last change: 2004 Jul 02 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -1514,6 +1514,51 @@ A jump table for the options with a short description can be found at |Q_op|. |
1514 | 1514 | based expansion (eg dictionary |i_CTRL-X_CTRL-K|, included patterns |
1515 | 1515 | |i_CTRL-X_CTRL-I|, tags |i_CTRL-X_CTRL-]| and normal expansions) |
1516 | 1516 |
|
| 1517 | + *'completefunc'* *'cfu'* |
| 1518 | +'completefunc' 'cfu' string (default: empty) |
| 1519 | + local to buffer |
| 1520 | + {not in Vi} |
| 1521 | + This option specifies a completion function to be used for CTRL-X |
| 1522 | + CTRL-X. The function will be invoked with four arguments: |
| 1523 | + a:line the text of the current line |
| 1524 | + a:base the text with which matches should match |
| 1525 | + a:col column in a:line where the cursor is, first column is |
| 1526 | + zero |
| 1527 | + a:findstart either 1 or 0 |
| 1528 | + When the a:findstart argument is 1, the function must return the |
| 1529 | + column of where the completion starts. It must be a number between |
| 1530 | + zero and "a:col". This involves looking at the characters in a:line |
| 1531 | + before column a:col and include those characters that could be part of |
| 1532 | + the completed item. |
| 1533 | + When the a:findstart argument is 0 the function must return a string |
| 1534 | + with the matching words, separated by newlines. When there are no |
| 1535 | + matches return an empty string. |
| 1536 | + An example that completes the names of the months: > |
| 1537 | + fun! CompleteMonths(line, base, col, findstart) |
| 1538 | + if a:findstart |
| 1539 | + " locate start column of word |
| 1540 | + let start = a:col |
| 1541 | + while start > 0 && a:line[start - 1] =~ '\a' |
| 1542 | + let start = start - 1 |
| 1543 | + endwhile |
| 1544 | + return start |
| 1545 | + else |
| 1546 | + " find months matching with "a:base" |
| 1547 | + let res = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec" |
| 1548 | + if a:base != '' |
| 1549 | + let res = substitute(res, '\c\<\(\(' . a:base . '.\{-}\>\)\|.\{-}\>\)', '\2', 'g') |
| 1550 | + endif |
| 1551 | + let res = substitute(res, ' \+', "\n", 'g') |
| 1552 | + return res |
| 1553 | + endif |
| 1554 | + endfun |
| 1555 | + set completefunc=CompleteMonths |
| 1556 | +< Note that a substitute() function is used to reduce the list of |
| 1557 | + possible values and remove the ones that don't match the base. The |
| 1558 | + part before the "\|" matches the base, the part after it is used |
| 1559 | + when there is no match. The "\2" in the replacement is empty if the |
| 1560 | + part before the "\|" does not match. |
| 1561 | + |
1517 | 1562 | *'confirm'* *'cf'* *'noconfirm'* *'nocf'* |
1518 | 1563 | 'confirm' 'cf' boolean (default off) |
1519 | 1564 | global |
@@ -3082,6 +3127,7 @@ A jump table for the options with a short description can be found at |Q_op|. |
3082 | 3127 | hidden although the 'hidden' option is off: When the buffer is |
3083 | 3128 | modified, 'autowrite' is off or writing is not possible, and the '!' |
3084 | 3129 | flag was used. See also |windows.txt|. |
| 3130 | + To only make one buffer hidden use the 'bufhidden' option. |
3085 | 3131 | This option is set for one command with ":hide {command}" |:hide|. |
3086 | 3132 | WARNING: It's easy to forget that you have changes in hidden buffers. |
3087 | 3133 | Think twice when using ":q!" or ":qa!". |
@@ -3835,17 +3881,19 @@ A jump table for the options with a short description can be found at |Q_op|. |
3835 | 3881 | precedes:c Character to show in the first column, when 'wrap' |
3836 | 3882 | is off and there is text preceding the character |
3837 | 3883 | visible in the first column. |
| 3884 | + nbsp:c Character to show for non-breakable space. Left to |
| 3885 | + blank when omitted. |
3838 | 3886 |
|
3839 | 3887 | The characters ':' and ',' should not be used. UTF-8 characters can |
3840 | 3888 | be used when 'encoding' is "utf-8", otherwise only printable |
3841 | 3889 | characters are allowed. |
3842 | 3890 |
|
3843 | 3891 | Examples: > |
3844 | 3892 | :set lcs=tab:>-,trail:- |
3845 | | - :set lcs=tab:>-,eol:< |
| 3893 | + :set lcs=tab:>-,eol:<,nbsp:% |
3846 | 3894 | :set lcs=extends:>,precedes:< |
3847 | 3895 | < The "NonText" highlighting will be used for "eol", "extends" and |
3848 | | - "precedes". "SpecialKey" for "tab" and "trail". |
| 3896 | + "precedes". "SpecialKey" for "nbsp", "tab" and "trail". |
3849 | 3897 |
|
3850 | 3898 | *'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'* |
3851 | 3899 | 'loadplugins' 'lpl' boolean (default on) |
@@ -4652,6 +4700,16 @@ A jump table for the options with a short description can be found at |Q_op|. |
4652 | 4700 | Example: > |
4653 | 4701 | :set printoptions=paper:letter,duplex:off |
4654 | 4702 | < |
| 4703 | + *'quoteescape''* *'qe'* |
| 4704 | +'quoteescape' 'qe' string (default "\") |
| 4705 | + local to buffer |
| 4706 | + {not in Vi} |
| 4707 | + The characters that are used to escape quotes in a string. Used for |
| 4708 | + objects like a', a" and a` |a'|. |
| 4709 | + When one of the characters in this option is found inside a string, |
| 4710 | + the following character will be skipped. The default value makes the |
| 4711 | + text "foo\"bar\\" considered to be one string. |
| 4712 | + |
4655 | 4713 | *'readonly'* *'ro'* *'noreadonly'* *'noro'* |
4656 | 4714 | 'readonly' 'ro' boolean (default off) |
4657 | 4715 | local to buffer |
|
0 commit comments