diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-03-04 21:55:31 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-03-04 21:55:31 +0000 |
commit | 87b5ca5172eb9e61f72f54f598d6d2ad646a8a76 (patch) | |
tree | 3d83af536ded8a5be657f757be1324595f672780 /runtime | |
parent | 36fc535cb1353786d7edacfea1cd3ececaf6cf5d (diff) |
updated for version 7.0214
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 71 | ||||
-rw-r--r-- | runtime/doc/options.txt | 11 | ||||
-rw-r--r-- | runtime/doc/spell.txt | 46 | ||||
-rw-r--r-- | runtime/doc/tags | 2 |
4 files changed, 110 insertions, 20 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index b2ca199447..90a8bfbe8d 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.0aa. Last change: 2006 Mar 03 +*eval.txt* For Vim version 7.0aa. Last change: 2006 Mar 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1718,6 +1718,8 @@ winheight( {nr}) Number height of window {nr} winline() Number window line of the cursor winnr( [{expr}]) Number number of current window winrestcmd() String returns command to restore window sizes +winrestview({dict}) None restore view of current window +winsaveview() Dict save view of current window winwidth( {nr}) Number width of window {nr} writefile({list}, {fname} [, {binary}]) Number write list of lines to file {fname} @@ -3670,7 +3672,8 @@ printf({fmt}, {expr1} ...) *printf()* pumvisible() *pumvisible()* Returns non-zero when the popup menu is visible, zero otherwise. See |ins-completion-menu|. - + This can be used to avoid some things that would remove the + popup menu. *E726* *E727* range({expr} [, {max} [, {stride}]]) *range()* @@ -3858,11 +3861,13 @@ search({pattern} [, {flags} [, {stopline}]]) *search()* {flags} is a String, which can contain these character flags: 'b' search backward instead of forward + 'c' accept a match at the cursor position + 'e' move to the End of the match 'n' do Not move the cursor + 'p' return number of matching sub-pattern (see below) + 's' set the ' mark at the previous location of the cursor 'w' wrap around the end of the file 'W' don't wrap around the end of the file - 's' set the ' mark at the previous location of the cursor - 'c' accept a match at the cursor position If neither 'w' or 'W' is given, the 'wrapscan' option applies. If the 's' flag is supplied, the ' mark is set, only if the @@ -3877,13 +3882,16 @@ search({pattern} [, {flags} [, {stopline}]]) *search()* < When {stopline} is used and it is not zero this also implies that the search does not wrap around the end of the file. - When a match has been found its line number is returned. - The cursor will be positioned at the match, unless the 'n' - flag is used. If there is no match a 0 is returned and the cursor doesn't move. No error message is given. + When a match has been found its line number is returned. With + the 'p' flag the returned value is one more than the first + sub-match in \(\). One if there is none. To get the column number too use |searchpos()|. + The cursor will be positioned at the match, unless the 'n' + flag is used. + Example (goes over all files in the argument list): > :let n = 1 :while n <= argc() " loop over all files in arglist @@ -3900,6 +3908,19 @@ search({pattern} [, {flags} [, {stopline}]]) *search()* : let n = n + 1 :endwhile < + Example for using some flags: > + :echo search('\<if\|\(else\)\|\(endif\)', 'ncpe') +< This will search for the keywords "if", "else", and "endif" + under or after the cursor. Because of the 'p' flag, it + returns 1, 2, or 3 depending on which keyword is found, or 0 + if the search fails. With the cursor on the first word of the + line: + if (foo == 0) | let foo = foo + 1 | endif ~ + the function returns 1. Without the 'c' flag, the function + finds the "endif" and returns 3. The same thing happens + without the 'e' flag if the cursor is on the "f" of "if". + The 'n' flag tells the function not to move the cursor. + searchdecl({name} [, {global} [, {thisblock}]]) *searchdecl()* Search for the declaration of {name}. @@ -3939,11 +3960,12 @@ searchpair({start}, {middle}, {end} [, {flags} [, {skip} [, {stopline}]]]) searchpair('\<if\>', '\<else\>', '\<endif\>') < By leaving {middle} empty the "else" is skipped. - {flags} are used like with |search()|. Additionally: + {flags} 'b', 'c', 'n', 's', 'w' and 'W' are used like with + |search()|. Additionally: 'r' Repeat until no more matches found; will find the outer pair 'm' return number of Matches instead of line number with - the match; will only be > 1 when 'r' is used. + the match; will be > 1 when 'r' is used. When a match for {start}, {middle} or {end} is found, the {skip} expression is evaluated with the cursor positioned on @@ -4764,11 +4786,40 @@ winnr([{arg}]) The result is a Number, which is the number of the current *winrestcmd()* winrestcmd() Returns a sequence of |:resize| commands that should restore the current window sizes. Only works properly when no windows - are opened or closed and the current window is unchanged. + are opened or closed and the current window and tab page is + unchanged. Example: > :let cmd = winrestcmd() :call MessWithWindowSizes() :exe cmd +< + *winrestview()* +winrestview({dict}) + Uses the |Dictionary| returned by |winsaveview()| to restore + the view of the current window. + If you have changed the values the result is unpredictable. + If the window size changed the result won't be the same. + + *winsaveview()* +winsaveview() Returns a |Dictionary| that contains information to restore + the view of the current window. Use |winrestview()| to + restore the view. + This is useful if you have a mapping that jumps around in the + buffer and you want to go back to the original view. + This does not save fold information. Use the 'foldenable' + option to temporarily switch of folding, so that folds are not + opened when moving around. + The return value includes: + lnum cursor line number + col cursor column + coladd cursor column offset for 'virtualedit' + curswant column for vertical movement + topline first line in the window + topfill filler lines, only in diff mode + leftcol first column displayed + skipcol columns skipped + Note that no option values are saved. + winwidth({nr}) *winwidth()* The result is a Number, which is the width of window {nr}. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 43cc7cd7e0..31cd140769 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.0aa. Last change: 2006 Mar 03 +*options.txt* For Vim version 7.0aa. Last change: 2006 Mar 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -6937,7 +6937,7 @@ A jump table for the options with a short description can be found at |Q_op|. Currently, these messages are given: >= 1 When the viminfo file is read or written. >= 2 When a file is ":source"'ed. - >= 5 Every searched tags file. + >= 5 Every searched tags file and include file. >= 8 Files for which a group of autocommands is executed. >= 9 Every executed autocommand. >= 12 Every executed function. @@ -7159,8 +7159,8 @@ A jump table for the options with a short description can be found at |Q_op|. char key mode ~ b <BS> Normal and Visual s <Space> Normal and Visual - h "h" Normal and Visual - l "l" Normal and Visual + h "h" Normal and Visual (not recommended) + l "l" Normal and Visual (not recommended) < <Left> Normal and Visual > <Right> Normal and Visual ~ "~" Normal @@ -7177,7 +7177,8 @@ A jump table for the options with a short description can be found at |Q_op|. ":map <BS> X" to make backspace delete the character in front of the cursor. When 'l' is included, you get a side effect: "yl" on an empty line - will include the <EOL>, so that "p" will insert a new line. + will include the <EOL>, so that "p" will insert a new line. That's + why including 'h' and 'l' are not recommended. NOTE: This option is set to the Vi default value when 'compatible' is set and to the Vim default value when 'compatible' is reset. diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index dc0ded005d..68ecb0ebe0 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1,4 +1,4 @@ -*spell.txt* For Vim version 7.0aa. Last change: 2006 Mar 01 +*spell.txt* For Vim version 7.0aa. Last change: 2006 Mar 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -84,28 +84,45 @@ zG Like "zg" but add the word to the internal word list *zw* zw Like "zg" but mark the word as a wrong (bad) word. + If the word already appears in 'spellfile' it is + turned into a comment line. See |spellfile-cleanup| + for getting rid of those. *zW* zW Like "zw" but add the word to the internal word list |internal-wordlist|. +zuw *zug* *zuw* +zug Undo |zw| and |zg|, remove the word from the entry in + 'spellfile'. Count used as with |zg|. + +zuW *zuG* *zuW* +zuG Undo |zW| and |zG|, remove the word from the internal + word list. Count used as with |zg|. + *:spe* *:spellgood* :[count]spe[llgood] {word} Add {word} as a good word to 'spellfile', like with - "zg". Without count the first name is used, with a + |zg|. Without count the first name is used, with a count of two the second entry, etc. :spe[llgood]! {word} Add {word} as a good word to the internal word list, - like with "zG". + like with |zG|. *:spellw* *:spellwrong* :[count]spellw[rong] {word} Add {word} as a wrong (bad) word to 'spellfile', as - with "zw". Without count the first name is used, with + with |zw|. Without count the first name is used, with a count of two the second entry, etc. :spellw[rong]! {word} Add {word} as a wrong (bad) word to the internal word - list. + list, like with |zW|. + +:[count]spellu[ndo] {word} *:spellu* *:spellundo* + Like |zuw|. [count] used as with |:spellgood|. + +:spellu[ndo]! {word} Like |zuW|. [count] used as with |:spellgood|. + After adding a word to 'spellfile' with the above commands its associated ".spl" file will automatically be updated and reloaded. If you change @@ -319,6 +336,25 @@ get an error the file may be truncated, modified or intended for another Vim version. +SPELLFILE CLEANUP *spellfile-cleanup* + +The |zw| command turns existing entries in 'spellfile' into comment lines. +This avoids having to write a new file every time, but results in the file +only getting longer, never shorter. To clean up the comment lines in all +".add" spell files do this: > + :runtime spell/cleanadd.vim + +This deletes all comment lines, except the ones that start with "##". Use +"##" lines to add comments that you want to keep. + +You can invoke this script as often as you like. A variable is provided to +skip updating files that have been changed recently. Set it to the number of +seconds that has passed since a file was changed before it will be cleaned. +For example, to clean only files that were not changed in the last hour: > + let g:spell_clean_limit = 60 * 60 +The default is one second. + + WORDS Vim uses a fixed method to recognize a word. This is independent of diff --git a/runtime/doc/tags b/runtime/doc/tags index 0b1784092e..bc07faa908 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -7506,6 +7506,8 @@ winheight() eval.txt /*winheight()* winline() eval.txt /*winline()* winnr() eval.txt /*winnr()* winrestcmd() eval.txt /*winrestcmd()* +winrestview() eval.txt /*winrestview()* +winsaveview() eval.txt /*winsaveview()* winwidth() eval.txt /*winwidth()* word motion.txt /*word* word-count editing.txt /*word-count* |