comparison runtime/doc/eval.txt @ 12968:45987b1b77dc

Update runtime files commit https://github.com/vim/vim/commit/2f0584910c0ea93966dfa7b3b0272dfb16ea6f91 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 30 20:27:52 2017 +0100 Update runtime files
author Christian Brabandt <cb@256bit.org>
date Thu, 30 Nov 2017 20:30:08 +0100
parents 1578c0ba0dd1
children 2d817fd289ba
comparison
equal deleted inserted replaced
12967:ec2cd6ab9411 12968:45987b1b77dc
1 *eval.txt* For Vim version 8.0. Last change: 2017 Nov 19 1 *eval.txt* For Vim version 8.0. Last change: 2017 Nov 24
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
4660 If the optional {what} dictionary argument is supplied, then 4660 If the optional {what} dictionary argument is supplied, then
4661 returns only the items listed in {what} as a dictionary. The 4661 returns only the items listed in {what} as a dictionary. The
4662 following string items are supported in {what}: 4662 following string items are supported in {what}:
4663 context get the context stored with |setqflist()| 4663 context get the context stored with |setqflist()|
4664 efm errorformat to use when parsing "lines". If 4664 efm errorformat to use when parsing "lines". If
4665 not present, then the 'erroformat' option 4665 not present, then the 'errorformat' option
4666 value is used. 4666 value is used.
4667 id get information for the quickfix list with 4667 id get information for the quickfix list with
4668 |quickfix-ID|; zero means the id for the 4668 |quickfix-ID|; zero means the id for the
4669 current list or the list specifed by "nr" 4669 current list or the list specified by "nr"
4670 idx index of the current entry in the list 4670 idx index of the current entry in the list
4671 items quickfix list entries 4671 items quickfix list entries
4672 lines use 'errorformat' to extract items from a list 4672 lines use 'errorformat' to extract items from a list
4673 of lines and return the resulting entries. 4673 of lines and return the resulting entries.
4674 Only a |List| type is accepted. The current 4674 Only a |List| type is accepted. The current
7693 items, since there are no real line breaks. 7693 items, since there are no real line breaks.
7694 7694
7695 When substitute() is used recursively only the submatches in 7695 When substitute() is used recursively only the submatches in
7696 the current (deepest) call can be obtained. 7696 the current (deepest) call can be obtained.
7697 7697
7698 Example: > 7698 Examples: >
7699 :s/\d\+/\=submatch(0) + 1/ 7699 :s/\d\+/\=submatch(0) + 1/
7700 :echo substitute(text, '\d\+', '\=submatch(0) + 1', '')
7700 < This finds the first number in the line and adds one to it. 7701 < This finds the first number in the line and adds one to it.
7701 A line break is included as a newline character. 7702 A line break is included as a newline character.
7702 7703
7703 substitute({expr}, {pat}, {sub}, {flags}) *substitute()* 7704 substitute({expr}, {pat}, {sub}, {flags}) *substitute()*
7704 The result is a String, which is a copy of {expr}, in which 7705 The result is a String, which is a copy of {expr}, in which