Vimcom and long command

66 views
Skip to first unread message

Hedj Non

unread,
Mar 30, 2015, 12:46:40 PM3/30/15
to vim-r-...@googlegroups.com
When I run a long command in a R shell run with <local...> rf without Tmux
after X character the next is writing at the beginning of the row.

If vimcom is not running this phenomenon not appears...

How can I fix this ?

Best regards

Jakson Alves de Aquino

unread,
Mar 30, 2015, 1:09:25 PM3/30/15
to vim-r-...@googlegroups.com
What is the version of your Tmux? It should be >= 1.8.

Can you, please, give an example of "long command"? I typed the following in the R Console (inside Tmux and with vimcom running)

c(1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 9, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3)

and the last numbers were displayed in the next row, as expected, and not at the beginning of the row where I started typing. That is, everything seems normal here.

Hedj Non

unread,
Mar 31, 2015, 3:09:36 AM3/31/15
to vim-r-...@googlegroups.com
Your command give this on my desktop computer :
3, 3, 3, 3, 3, 3, 3)3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 
 [1] 1 2 3 3 3 3 3 3 3 3 3 3 3 4 4 4 5 5 6 9 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
[51] 3 3 3 3 3 3 3 3 3

On my laptop is like you all is right.

The version of Tmux on the computer with the bug.
Paquet : tmux                                
État: installé
Automatiquement installé: non
Version : 1.8-5
Priorité : optionnel
Section : admin
Responsable : Ubuntu Developers <ubuntu-dev...@lists.ubuntu.com>
Architecture : amd64
Taille décompressée : 577 k

It look very strange.
The os is Ubuntu 14.04, up to date.

Jakson Alves de Aquino

unread,
Mar 31, 2015, 7:53:08 AM3/31/15
to vim-r-...@googlegroups.com
I have seen this problem, but it was a long time ago. I don't remember what was the cause and how I have solved it. I tried starting R without Tmux (in an external terminal), and it's works fine here (Ubuntu 14.10). I am sorry, but without being able to reproduce the bug, I can't solve it.

Things that you can try:
  • Look at your .tmux.conf for anything suspect.
  • Test different terminal emulators.
  • Test old versions of Vim-R-plugin and vimcom. If you discover that the bug started at a specific version, I may look at the differences in the code of vimcom between the first problematic version and the previous one to try to figure out the cause of the bug.

Hedj Non

unread,
Mar 31, 2015, 8:54:43 AM3/31/15
to vim-r-...@googlegroups.com
It's very strange my first .tmux was write by the old command : :RpluginConfig (which is deleted ?)
I copy paste this code from the doc to my .tmux

   # Use <C-a> instead of the default <C-b> as Tmux prefix
   set-option -g prefix C-a
   unbind-key C-b
   bind-key C-a send-prefix

   # Options enable mouse support in Tmux
   set -g terminal-overrides 'xterm*:smcup@:rmcup@'
   set -g mode-mouse on
   set -g mouse-select-pane on
   set -g mouse-resize-pane on

   # Act more like vim:
   set-window-option -g mode-keys vi
   bind h select-pane -L
   bind j select-pane -D
   bind k select-pane -U
   bind l select-pane -R
   unbind p
   bind p paste-buffer
   bind -t vi-copy v begin-selection
   bind -t vi-copy y copy-selection

And all is ok...
I d'on't know why...

Hedj Non

unread,
Mar 31, 2015, 8:57:38 AM3/31/15
to vim-r-...@googlegroups.com
Sorry it 's not solved if I call back a command or run it from Gvim the bug stay but not if I write in the R console at the first time

Hedj Non

unread,
Mar 31, 2015, 9:12:52 AM3/31/15
to vim-r-...@googlegroups.com
I have specified the problem it is occuring only after have send a command line from Gvim to R
Before in R I can make long command run them call back them

This not occur when I use Vim and not GVim...

Jakson Alves de Aquino

unread,
Mar 31, 2015, 9:25:05 AM3/31/15
to vim-r-...@googlegroups.com
I tested with GVim too. I can't see any no problem here.

daan...@gmail.com

unread,
Sep 24, 2015, 6:40:38 AM9/24/15
to Vim-R-plugin
I have this problem too. I'm using the latest version of the plugin (Vim-R-plugin 1.2.6) with vimcom 1.2-6, tmux 1.9 in xterm.

Also, when browsing long commands in the command history at the R prompt with the up and down arrows or reverse-i-search, things get very messed up. The prompt disappears and in stead an empty line appears, the cursor and part of the previous long command currently being browsed is shown one line up, replacing whatever was shown there before. Continuing browsing will thus erase previous input and output. Issuing a command with RETURN will run it, but it is often hard to tell which command that is because text is so messed up. The cursor is also not indicating where you are editing a command, in stead you are editing invisible text one line below. After running a command, you get your normal R prompt back, but not the input/output that has been erased. The prompt will than typically be half way up your tmux pane whereas it first was at the bottom.

NOTE: the problem does not occur, it seems, when the tmux pane with R console is less than about 80 characters wide.

Jakson Alves de Aquino

unread,
Sep 24, 2015, 10:01:47 AM9/24/15
to Vim-R-plugin
Thanks for the detailed description! Now, I can replicate the bug with xterm and Tmux 1.8. There is no problem with LXTerm. I did the following to see the bug:
  1. Put in the vimrc: vimrplugin_term = "xterm"
  2. Started GVim, started editing an R file and started R
  3. Wrote a long line in the R script
  4. Dragged the lateral of the xterm window to make it wider than 80 characters
  5. Sent the long line
However, I don't know how to solve the bug. Perhaps there is either a xterm or a tmux configuration that avoids the bug.

daan...@gmail.com

unread,
Sep 24, 2015, 10:44:05 AM9/24/15
to Vim-R-plugin
On my system, the problem appears in lxterminal, xfce4-terminal and gnome-terminal as well.
Reply all
Reply to author
Forward
0 new messages