Updated runtime files.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.3. Last change: 2011 Aug 19
|
||||
*map.txt* For Vim version 7.3. Last change: 2011 Oct 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -237,11 +237,18 @@ For this reason the following is blocked:
|
||||
- Editing another buffer.
|
||||
- The |:normal| command.
|
||||
- Moving the cursor is allowed, but it is restored afterwards.
|
||||
- You can use getchar(), but the existing typeahead isn't seen and new
|
||||
typeahead is discarded.
|
||||
If you want the mapping to do any of these let the returned characters do
|
||||
that.
|
||||
|
||||
You can use getchar(), it consumes typeahead if there is any. E.g., if you
|
||||
have these mappings: >
|
||||
inoremap <expr> <C-L> nr2char(getchar())
|
||||
inoremap <expr> <C-L>x "foo"
|
||||
If you now type CTRL-L nothing happens yet, Vim needs the next character to
|
||||
decide what mapping to use. If you type 'x' the second mapping is used and
|
||||
"foo" is inserted. If you type 'a' the first mapping is used, getchar() gets
|
||||
the 'a' and returns it.
|
||||
|
||||
Here is an example that inserts a list number that increases: >
|
||||
let counter = 0
|
||||
inoremap <expr> <C-L> ListItem()
|
||||
|
||||
Reference in New Issue
Block a user