Open awoodx opened 1 week ago
I can't replicate the issue. R.nvim
reads my ~/.inputrc
and correctly recognizes that my editing_mode
should be "vi". When running R in a Tmux split pane, if there is any text in the R prompt, it is cleared when a command is sent.
I also have this in my ~/.config/tmux/tmux.config
:
set-window-option -g mode-keys vi
This in my ~/.bashrc
:
set -o vi
And this in ~/.config/fish/config.fish
:
fish_vi_key_bindings
yes, I agree. The issue might not be related to tmux, but I do see instances where there clear_line isn't working, but I'm not able to reliably reproduce it. I will report back if I can a repro. Thanks!
I think I found a way to reproduce it, it's related to the Escape
key in emacs mode.
set editing-mode emacs
in ~/.inputrcgarbage
) in the R console followed by the Escape
key.The garbage
text isn't cleared.
I can replicate the issue following your four steps. To be sure that I would be in "pure" emacs mode, I removed the vi mode from all configuration files (.inputrc
, .bashrc
, tmux.conf
, and config.fish
).
Of course, (n)vi(m) users inadvertently type the <Esc>
key everywhere. However, I guess that we can't fix the issue in this case because Neovim has no way of knowing that the <Esc>
key was typed on the R console.
Having the R console in a separate tmux pane works better for my workflow, and I saw the recent tmux issue (https://github.com/R-nvim/R.nvim/issues/152). My R session works with tmux, but the
clear_line
option doesn't work. When I run a line in R, it appends to the text in the R console.This is my R config:
local opts = { clear_line = true, external_term = "tmux split-window -hf " }