'q' is appended when switching between editor and console and scrolling

16 views
Skip to first unread message

Olga Lyashevska

unread,
Jul 6, 2021, 4:42:37 AM7/6/21
to Nvim-R
Hi all, 

Thanks for your plugin!

I am switching between edit and console with Vim commands (e.g CRTRL-W ->), however each time there is a 'q' appended at the beginning of the prompt. Please see a screenshot. How can I get rid of it?

Also what is the best way to scroll through the output. I read somewhere that I need to use CTRL \ CTRL n which works fine, but I wonder if scrolling can be made a default? Typically output exceeds the size of the window.

Many thanks,2021-07-06_09:36:39.png
Olga

Jakson Alves de Aquino

unread,
Jul 6, 2021, 7:12:32 AM7/6/21
to Nvim-R
I have seen this with Neovim on Linux console, and the solution was to put this in the init.vim:

if $TERM == "linux"
  set guicursor=
endif

Olga Lyashevska

unread,
Jul 6, 2021, 7:33:06 AM7/6/21
to Nvim-R
Thanks. I am using vim, and in this case I guess it should go to .vimrc. However the problem seem to persist.  

Jakson Alves de Aquino

unread,
Jul 6, 2021, 8:15:18 AM7/6/21
to Nvim-R
Yes, it would go to your vimrc. I can't replicate the issue with either Vim or Neovim. So, I don't know what you could do to fix it.

Regarding the second question (which I didn't answer), please, see Vim's help on R_esc_term:

:h R_esc_term

Olga Lyashevska

unread,
Jul 6, 2021, 5:28:46 PM7/6/21
to Nvim-R
Thanks for the help!  Much appreciated. I have added now  'let R_esc_term = 1' , although it was supposed to be default if I read it correctly.  
Now I should be able to press Esc and to navigate as I do it in vim? Nothing happens when I press Esc. Apologies for the basic questions.

In terms of guicursor issue, it only happens when I move to the R console and not in between vim splits, is R console running within a vim split? 
Maybe some settings in bashrc or vimrc are clashing. Here is what I have in my vimrc so far ...

" vim-r-plugin config start
" Change Leader and LocalLeader keys:
let maplocalleader = ','  
let mapleader = ';'  
let R_hl_term = 0  
let R_assign = 2  
let Rout_more_colors = 1  
let rout_follow_colorscheme = 1  
let R_esc_term = 1  
" let R_external_term = "konsole"
" vim as a pager
let R_open_example = 0  
let R_nvimpager = 'no'
let R_editing_mode = "vi"
" Use Ctrl+Space to do omnicompletion:
if has('nvim') || has('gui_running')
   inoremap <C-Space> <C-x><C-o>
else
   inoremap <Nul> <C-x><C-o>
endif
" Press the space bar to send lines and selection to R:
vmap <Space> <Plug>RESendSelection
nmap <Space> <Plug>RDSendLine
" let R_external_term = 1 " Run R in an external terminal  
" let R_external_term = 'konsole' " Run R in in xterm
" vim-r-plugin config end


Reply all
Reply to author
Forward
0 new messages