Mercurial > vim
comparison runtime/doc/eval.txt @ 18130:1e5672da6a69
Updte runtime files
Commit: https://github.com/vim/vim/commit/589edb340454e7f1b19358f129287a636d53d0e1
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 20 14:38:13 2019 +0200
Updte runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 20 Sep 2019 14:45:05 +0200 |
parents | 7f57ea9a4ba8 |
children | 4ac8161e92e0 |
comparison
equal
deleted
inserted
replaced
18129:52078b0635f7 | 18130:1e5672da6a69 |
---|---|
1 *eval.txt* For Vim version 8.1. Last change: 2019 Sep 15 | 1 *eval.txt* For Vim version 8.1. Last change: 2019 Sep 19 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
2593 nr2char({expr} [, {utf8}]) String single char with ASCII/UTF8 value {expr} | 2593 nr2char({expr} [, {utf8}]) String single char with ASCII/UTF8 value {expr} |
2594 or({expr}, {expr}) Number bitwise OR | 2594 or({expr}, {expr}) Number bitwise OR |
2595 pathshorten({expr}) String shorten directory names in a path | 2595 pathshorten({expr}) String shorten directory names in a path |
2596 perleval({expr}) any evaluate |Perl| expression | 2596 perleval({expr}) any evaluate |Perl| expression |
2597 popup_atcursor({what}, {options}) Number create popup window near the cursor | 2597 popup_atcursor({what}, {options}) Number create popup window near the cursor |
2598 popup_beval({what}, {options}) Number create popup window for 'ballooneval' | 2598 popup_beval({what}, {options}) Number create popup window for 'ballooneval' |
2599 popup_clear() none close all popup windows | 2599 popup_clear() none close all popup windows |
2600 popup_close({id} [, {result}]) none close popup window {id} | 2600 popup_close({id} [, {result}]) none close popup window {id} |
2601 popup_create({what}, {options}) Number create a popup window | 2601 popup_create({what}, {options}) Number create a popup window |
2602 popup_dialog({what}, {options}) Number create a popup window used as a dialog | 2602 popup_dialog({what}, {options}) Number create a popup window used as a dialog |
2603 popup_filter_menu({id}, {key}) Number filter for a menu popup window | 2603 popup_filter_menu({id}, {key}) Number filter for a menu popup window |
9046 state([{what}]) *state()* | 9046 state([{what}]) *state()* |
9047 Return a string which contains characters indicating the | 9047 Return a string which contains characters indicating the |
9048 current state. Mostly useful in callbacks that want to do | 9048 current state. Mostly useful in callbacks that want to do |
9049 work that may not always be safe. Roughly this works like: | 9049 work that may not always be safe. Roughly this works like: |
9050 - callback uses state() to check if work is safe to do. | 9050 - callback uses state() to check if work is safe to do. |
9051 If yes, then do it right away. | 9051 Yes: then do it right away. |
9052 Otherwise add to work queue and add SafeState and/or | 9052 No: add to work queue and add a |SafeState| and/or |
9053 SafeStateAgain autocommand. | 9053 |SafeStateAgain| autocommand (|SafeState| triggers at |
9054 - When SafeState or SafeStateAgain is triggered, check with | 9054 toplevel, |SafeStateAgain| triggers after handling |
9055 state() if the work can be done now, and if yes remove it | 9055 messages and callbacks). |
9056 from the queue and execute. | 9056 - When SafeState or SafeStateAgain is triggered and executes |
9057 your autocommand, check with `state()` if the work can be | |
9058 done now, and if yes remove it from the queue and execute. | |
9059 Remove the autocommand if the queue is now empty. | |
9057 Also see |mode()|. | 9060 Also see |mode()|. |
9058 | 9061 |
9059 When {what} is given only characters in this string will be | 9062 When {what} is given only characters in this string will be |
9060 added. E.g, this checks if the screen has scrolled: > | 9063 added. E.g, this checks if the screen has scrolled: > |
9061 if state('s') != '' | 9064 if state('s') == '' |
9065 " screen has not scrolled | |
9062 < | 9066 < |
9063 These characters indicate the state, generally indicating that | 9067 These characters indicate the state, generally indicating that |
9064 something is busy: | 9068 something is busy: |
9065 m halfway a mapping, :normal command, feedkeys() or | 9069 m halfway a mapping, :normal command, feedkeys() or |
9066 stuffed command | 9070 stuffed command |
9067 o operator pending or waiting for a command argument | 9071 o operator pending or waiting for a command argument, |
9068 a Insert mode autocomplete active | 9072 e.g. after |f| |
9069 x executing an autocommand | 9073 a Insert mode autocomplete active |
9070 w blocked on waiting, e.g. ch_evalexpr() and | 9074 x executing an autocommand |
9071 ch_read(), ch_readraw() when reading json. | 9075 w blocked on waiting, e.g. ch_evalexpr() and |
9072 S not triggering SafeState or SafeStateAgain | 9076 ch_read(), ch_readraw() when reading json. |
9073 c callback invoked, including timer (repeats for | 9077 S not triggering SafeState or SafeStateAgain |
9074 recursiveness up to "ccc") | 9078 c callback invoked, including timer (repeats for |
9075 s screen has scrolled for messages | 9079 recursiveness up to "ccc") |
9080 s screen has scrolled for messages | |
9076 | 9081 |
9077 str2float({expr}) *str2float()* | 9082 str2float({expr}) *str2float()* |
9078 Convert String {expr} to a Float. This mostly works the same | 9083 Convert String {expr} to a Float. This mostly works the same |
9079 as when using a floating point number in an expression, see | 9084 as when using a floating point number in an expression, see |
9080 |floating-point-format|. But it's a bit more permissive. | 9085 |floating-point-format|. But it's a bit more permissive. |