From 2844cd54dab2893a0baa0464e8de0a01f1048b05 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Wed, 1 Jul 2020 21:57:03 -0400 Subject: docs: Describe how to escape keycodes with nvim_feedkeys (#12484) Closes #12297 --- runtime/doc/api.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'runtime/doc/api.txt') 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 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("", v:true, v:false, v:true) + :call nvim_feedkeys(key, 'n', v:true) +< + Parameters: ~ {keys} to be typed {mode} behavior flags, see |feedkeys()| -- cgit