nvim-editcommand
nvim-editcommand copied to clipboard
prompt may change if user enters an interpreter
If a user enters a interpreter from within the terminal. e.g. python
, then the prompt may change, $
-> >>>
. We should provide a mechanism to automatically update the prompt, and reset the prompt, when the user leaves the interpreter.
To do this we could remap <cr>
to run some commands if the current command is python/lua/ruby/etc.. and the same for whatever command is used to exit the interpreter. We will also need to handle the case where the user uses control characters, e.g. ^C
, to leave the interpreter.
I'll probably implement this in nvim-terminus first and port it back if it makes sense to do so.
Perhaps just enable a regex for editcommand_prompt
? I'm currently doing let g:editcommand_prompt = '#'
for psql
.
Btw, thanks a lot for nvim-editcommand, really useful!