comparison runtime/doc/eval.txt @ 504:35cde31bdcbd

updated for version 7.0141
author vimboss
date Mon, 05 Sep 2005 22:11:52 +0000
parents 52e76e2b5b65
children 04dcb5a1f2f9
comparison
equal deleted inserted replaced
503:c9ec7077a195 504:35cde31bdcbd
1 *eval.txt* For Vim version 7.0aa. Last change: 2005 Aug 31 1 *eval.txt* For Vim version 7.0aa. Last change: 2005 Sep 05
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
1605 rename( {from}, {to}) Number rename (move) file from {from} to {to} 1605 rename( {from}, {to}) Number rename (move) file from {from} to {to}
1606 repeat( {expr}, {count}) String repeat {expr} {count} times 1606 repeat( {expr}, {count}) String repeat {expr} {count} times
1607 resolve( {filename}) String get filename a shortcut points to 1607 resolve( {filename}) String get filename a shortcut points to
1608 reverse( {list}) List reverse {list} in-place 1608 reverse( {list}) List reverse {list} in-place
1609 search( {pattern} [, {flags}]) Number search for {pattern} 1609 search( {pattern} [, {flags}]) Number search for {pattern}
1610 searchdecl({name} [, {global}]) Number search for variable declaration
1610 searchpair( {start}, {middle}, {end} [, {flags} [, {skip}]]) 1611 searchpair( {start}, {middle}, {end} [, {flags} [, {skip}]])
1611 Number search for other end of start/end pair 1612 Number search for other end of start/end pair
1612 server2client( {clientid}, {string}) 1613 server2client( {clientid}, {string})
1613 Number send reply string 1614 Number send reply string
1614 serverlist() String get a list of available servers 1615 serverlist() String get a list of available servers
1620 setwinvar( {nr}, {varname}, {val}) set {varname} in window {nr} to {val} 1621 setwinvar( {nr}, {varname}, {val}) set {varname} in window {nr} to {val}
1621 simplify( {filename}) String simplify filename as much as possible 1622 simplify( {filename}) String simplify filename as much as possible
1622 sort( {list} [, {func}]) List sort {list}, using {func} to compare 1623 sort( {list} [, {func}]) List sort {list}, using {func} to compare
1623 soundfold( {word}) String sound-fold {word} 1624 soundfold( {word}) String sound-fold {word}
1624 spellbadword() String badly spelled word at cursor 1625 spellbadword() String badly spelled word at cursor
1625 spellsuggest({word} [, {max}]) List spelling suggestions 1626 spellsuggest( {word} [, {max}]) List spelling suggestions
1626 split( {expr} [, {pat} [, {keepempty}]]) 1627 split( {expr} [, {pat} [, {keepempty}]])
1627 List make List from {pat} separated {expr} 1628 List make List from {pat} separated {expr}
1628 strftime( {format}[, {time}]) String time in specified format 1629 strftime( {format}[, {time}]) String time in specified format
1629 stridx( {haystack}, {needle}[, {start}]) 1630 stridx( {haystack}, {needle}[, {start}])
1630 Number index of {needle} in {haystack} 1631 Number index of {needle} in {haystack}
3706 : let flags = "W" 3707 : let flags = "W"
3707 : endwhile 3708 : endwhile
3708 : update " write the file if modified 3709 : update " write the file if modified
3709 : let n = n + 1 3710 : let n = n + 1
3710 :endwhile 3711 :endwhile
3712 <
3713
3714 searchdecl({name} [, {global}]) *searchdecl()*
3715 Search for the declaration of {name}. Without {global} or
3716 with a zero {global} argument this works like |gd|. With a
3717 non-zero {global} argument it works like |gD|.
3718 Moves the cursor to the found match.
3719 Returns zero for success, non-zero for failure.
3720 Example: >
3721 if searchdecl('myvar') == 0
3722 echo getline('.')
3723 endif
3711 < 3724 <
3712 *searchpair()* 3725 *searchpair()*
3713 searchpair({start}, {middle}, {end} [, {flags} [, {skip}]]) 3726 searchpair({start}, {middle}, {end} [, {flags} [, {skip}]])
3714 Search for the match of a nested start-end pair. This can be 3727 Search for the match of a nested start-end pair. This can be
3715 used to find the "endif" that matches an "if", while other 3728 used to find the "endif" that matches an "if", while other
4666 The function name must start with an uppercase letter, to avoid confusion with 4679 The function name must start with an uppercase letter, to avoid confusion with
4667 builtin functions. To prevent from using the same name in different scripts 4680 builtin functions. To prevent from using the same name in different scripts
4668 avoid obvious, short names. A good habit is to start the function name with 4681 avoid obvious, short names. A good habit is to start the function name with
4669 the name of the script, e.g., "HTMLcolor()". 4682 the name of the script, e.g., "HTMLcolor()".
4670 4683
4671 It's also possible to use curly braces, see |curly-braces-names|. 4684 It's also possible to use curly braces, see |curly-braces-names|. And the
4685 |autoload| facility is useful to define a function only when it's called.
4672 4686
4673 *local-function* 4687 *local-function*
4674 A function local to a script must start with "s:". A local script function 4688 A function local to a script must start with "s:". A local script function
4675 can only be called from within the script and from functions, user commands 4689 can only be called from within the script and from functions, user commands
4676 and autocommands defined in the script. It is also possible to call the 4690 and autocommands defined in the script. It is also possible to call the
4682 4696
4683 :fu[nction] {name} List function {name}. 4697 :fu[nction] {name} List function {name}.
4684 {name} can also be a Dictionary entry that is a 4698 {name} can also be a Dictionary entry that is a
4685 Funcref: > 4699 Funcref: >
4686 :function dict.init 4700 :function dict.init
4701
4702 :fu[nction] /{pattern} List functions with a name matching {pattern}.
4703 Example that lists all functions ending with "File": >
4704 :function /File$
4687 < 4705 <
4688 *:function-verbose* 4706 *:function-verbose*
4689 When 'verbose' is non-zero, listing a function will also display where it was 4707 When 'verbose' is non-zero, listing a function will also display where it was
4690 last defined. Example: > 4708 last defined. Example: >
4691 4709