aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/api.txt
diff options
context:
space:
mode:
authorAnmol Sethi <hi@nhooyr.io>2020-07-01 21:57:03 -0400
committerGitHub <noreply@github.com>2020-07-01 21:57:03 -0400
commit2844cd54dab2893a0baa0464e8de0a01f1048b05 (patch)
tree0b714238b1d9cc2cde31319015368cbb62e911ff /runtime/doc/api.txt
parent267bc57d21fd7cc995ea91028de912d92d5fd662 (diff)
downloadrneovim-2844cd54dab2893a0baa0464e8de0a01f1048b05.tar.gz
rneovim-2844cd54dab2893a0baa0464e8de0a01f1048b05.tar.bz2
rneovim-2844cd54dab2893a0baa0464e8de0a01f1048b05.zip
docs: Describe how to escape keycodes with nvim_feedkeys (#12484)
Closes #12297
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r--runtime/doc/api.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index fdabb0da50..67260904a6 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -729,6 +729,15 @@ nvim_feedkeys({keys}, {mode}, {escape_csi}) *nvim_feedkeys()*
On execution error: does not fail, but updates v:errmsg.
+ If you need to input sequences like <C-o> use nvim_replace_termcodes
+ to replace the termcodes and then pass the resulting string to
+ nvim_feedkeys. You'll also want to enable escape_csi.
+
+ Example: >
+ :let key = nvim_replace_termcodes("<C-o>", v:true, v:false, v:true)
+ :call nvim_feedkeys(key, 'n', v:true)
+<
+
Parameters: ~
{keys} to be typed
{mode} behavior flags, see |feedkeys()|