summaryrefslogtreecommitdiff
path: root/runtime/doc/eval.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-06-12 21:46:14 +0200
committerBram Moolenaar <Bram@vim.org>2014-06-12 21:46:14 +0200
commit822ff866bd6558be993d4455a22454ae53db0eca (patch)
tree3993d806cfe837d1796d8007d39be4526f00f0e0 /runtime/doc/eval.txt
parent2d54ec92d42a659aca4ec9e16521cd32767a7faa (diff)
downloadvim-git-822ff866bd6558be993d4455a22454ae53db0eca.tar.gz
Update runtime files.
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r--runtime/doc/eval.txt63
1 files changed, 34 insertions, 29 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 86cc88efa..1ffd7ed01 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.4. Last change: 2014 May 07
+*eval.txt* For Vim version 7.4. Last change: 2014 Jun 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3260,6 +3260,10 @@ getchar([expr]) *getchar()*
String when a modifier (shift, control, alt) was used that is
not included in the character.
+ When [expr] is 0 and Esc is typed, there will be a short delay
+ while Vim waits to see if this is the start of an escape
+ sequence.
+
When [expr] is 1 only the first byte is returned. For a
one-byte character it is the character itself as a number.
Use nr2char() to convert it to a String.
@@ -3475,6 +3479,34 @@ getmatches() *getmatches()*
'pattern': 'FIXME', 'priority': 10, 'id': 2}] >
:unlet m
<
+ *getpid()*
+getpid() Return a Number which is the process ID of the Vim process.
+ On Unix and MS-Windows this is a unique number, until Vim
+ exits. On MS-DOS it's always zero.
+
+ *getpos()*
+getpos({expr}) Get the position for {expr}. For possible values of {expr}
+ see |line()|. For getting the cursor position see
+ |getcurpos()|.
+ The result is a |List| with four numbers:
+ [bufnum, lnum, col, off]
+ "bufnum" is zero, unless a mark like '0 or 'A is used, then it
+ is the buffer number of the mark.
+ "lnum" and "col" are the position in the buffer. The first
+ column is 1.
+ The "off" number is zero, unless 'virtualedit' is used. Then
+ it is the offset in screen columns from the start of the
+ character. E.g., a position within a <Tab> or after the last
+ character.
+ Note that for '< and '> Visual mode matters: when it is "V"
+ (visual line mode) the column of '< is zero and the column of
+ '> is a large number.
+ This can be used to save and restore the position of a mark: >
+ let save_a_mark = getpos("'a")
+ ...
+ call setpos(''a', save_a_mark
+< Also see |getcurpos()| and |setpos()|.
+
getqflist() *getqflist()*
Returns a list with all the current quickfix errors. Each
@@ -4506,34 +4538,6 @@ nr2char({expr}[, {utf8}]) *nr2char()*
characters. nr2char(0) is a real NUL and terminates the
string, thus results in an empty string.
- *getpid()*
-getpid() Return a Number which is the process ID of the Vim process.
- On Unix and MS-Windows this is a unique number, until Vim
- exits. On MS-DOS it's always zero.
-
- *getpos()*
-getpos({expr}) Get the position for {expr}. For possible values of {expr}
- see |line()|. For getting the cursor position see
- |getcurpos()|.
- The result is a |List| with four numbers:
- [bufnum, lnum, col, off]
- "bufnum" is zero, unless a mark like '0 or 'A is used, then it
- is the buffer number of the mark.
- "lnum" and "col" are the position in the buffer. The first
- column is 1.
- The "off" number is zero, unless 'virtualedit' is used. Then
- it is the offset in screen columns from the start of the
- character. E.g., a position within a <Tab> or after the last
- character.
- Note that for '< and '> Visual mode matters: when it is "V"
- (visual line mode) the column of '< is zero and the column of
- '> is a large number.
- This can be used to save and restore the position of a mark: >
- let save_a_mark = getpos("'a")
- ...
- call setpos(''a', save_a_mark
-< Also see |getcurpos()| and |setpos()|.
-
or({expr}, {expr}) *or()*
Bitwise OR on the two arguments. The arguments are converted
to a number. A List, Dict or Float argument causes an error.
@@ -5587,6 +5591,7 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
If you want a list to remain unmodified make a copy first: >
:let sortedlist = sort(copy(mylist))
+
< Uses the string representation of each item to sort on.
Numbers sort after Strings, |Lists| after Numbers.
For sorting text in the current buffer use |:sort|.