Almost every action is supported(except for undo/redo and replace mode), even actions from plugins such as 'ds' from nvim-surround
via lazy.nvim
{
'xb-bx/editable-term.nvim',
config = true,
}By default the plugin only detects OSC 133 promt lines but you can extend it to support REPLs that dont support OSC 133.
local editableterm = require('editable-term')
editableterm.setup({
promts = {
['^%(gdb%) '] = {}, -- gdb promt
['^... '] = {}, -- python PS1
['^>>> '] = {}, -- python PS2
['some_other_prompt'] = {
keybinds = {
clear_current_line = 'keys to clear the line',
goto_line_start = 'keys to goto line start',
forward_char = 'keys to move forward one character',
}
},
},
}){
clear_current_line = '<C-e><C-u>',
forward_char = '<C-f>',
goto_line_start = '<C-a>',
}add following to your init.lua
vim.env['IS_NVIM_TERM']='1'add following to your shell's rc file
if ! [ "$IS_NVIM_TERM" = "1" ]; then
set -o vi
fi