Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Send A Modifier Via vimapinvim_feedkeys in Neovim

Code snippet to remind myself how to do it

Code

local delete_key = vim.api.nvim_replace_termcodes('<BS>', true, false, true)
vim.api.nvim_feedkeys(delete_key, "i", true)

Code

local enter_key = vim.api.nvim_replace_termcodes('<CR>', true, false, true)
vim.api.nvim_feedkeys(enter_key, "i", true)