diff options
author | Anmol Sethi <hi@nhooyr.io> | 2020-07-01 21:57:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-01 21:57:03 -0400 |
commit | 2844cd54dab2893a0baa0464e8de0a01f1048b05 (patch) | |
tree | 0b714238b1d9cc2cde31319015368cbb62e911ff /src | |
parent | 267bc57d21fd7cc995ea91028de912d92d5fd662 (diff) | |
download | rneovim-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 'src')
-rw-r--r-- | src/nvim/api/vim.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 40cef87cf0..d6f95c7a5f 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -203,6 +203,16 @@ Integer nvim_get_hl_id_by_name(String name) /// flags. This is a blocking call, unlike |nvim_input()|. /// /// 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: +/// <pre> +/// :let key = nvim_replace_termcodes("<C-o>", v:true, v:false, v:true) +/// :call nvim_feedkeys(key, 'n', v:true) +/// </pre> /// /// @param keys to be typed /// @param mode behavior flags, see |feedkeys()| |