The most basic form is something like this: imap imap =PrintChar() function! PrintChar() let chr="" if getchar(1) let chr = getchar() endif call feedkeys("\") echo chr return '' endfunction When the user presses F8, the above script simply echos the keypresses until the user presses Escape. Every time PrintChar() is called, it uses feedkeys() to reactivate itself, setting up an input loop.
Attributes | Values |
---|---|
rdfs:label |
|
rdfs:comment |
|
Version |
|
dbkwik:vim/property/wikiPageUsesTemplate | |
Previous |
|
Author |
|
Subpage |
|
Complexity |
|
Created |
|
ID |
|
NEXT |
|
abstract |
|