Git Product home page Git Product logo

Comments (11)

jalvesaq avatar jalvesaq commented on September 16, 2024 1

On Ubuntu 16.04, if Vim is already running in a Tmux session, \rf starts R in a Tmux split pane. I tested with this minimal vimrc:

set nocompatible
call plug#begin('~/.config/nvim/plugged')
Plug 'jalvesaq/Nvim-R'
call plug#end()
filetype plugin indent on
syntax on
let R_tmux_split = 1

from nvim-r.

jalvesaq avatar jalvesaq commented on September 16, 2024

My goal is to incentive the use of Neovim because its setup is simpler for new users. If using Neovim and running R in a Neovim buffer, the plugin will depend only on R, which is an obvious dependency. No special configuration is required in the vimrc, bashrc, Rprofile or tmux.conf. The option R_tmux_split is in the FAQ section because if it was in the Options section I would have to bring all the complication from Vim-R-plugin Installation and Use sections to Nvim-R.

We may let this issue open for some weeks because Vim-R-plugin users will find it useful.

from nvim-r.

mccurdyc avatar mccurdyc commented on September 16, 2024

@jimhester @jalvesaq would you be willing to help me preserve the behavior of the Vim-R-Plugin on OS X?
I would prefer to have R open in another Tmux pane instead of its own window.

I have tried setting let g:R_tmux_split = 1 in my .vimrc but now I am receiving the error:

Error detected while processing function StartR: line 119: E117: Unknown function: StartR_TmuxSplit

from nvim-r.

mccurdyc avatar mccurdyc commented on September 16, 2024

If I remove the let g:R_tmux_split = 1 from my .vimrc, R starts as expected, but in a new window.

I am running tmux version 2.1 and a custom-built Vim 7.4 with +channel +conceal +job enabled.

from nvim-r.

jalvesaq avatar jalvesaq commented on September 16, 2024

Are you sure that you do not have old files in your .vim directory? The file R/tmux_split.vim will not be completely sourced (and, consequently, the function StartR_TmuxSplit will not be defined) if the function TmuxActivePane is already defined. If you do this

cd ~/.vim
grep -R 'function TmuxActivePane'

the searched string should be found in only one script (R/tmux_split.vim).

from nvim-r.

mccurdyc avatar mccurdyc commented on September 16, 2024

After grepping the .vim directory this was the only file to contain this function declaration.

cd ~/.vim
grep -rnw "." -e 'function TmuxActivePane'
./plugged/Nvim-R/R/tmux_split.vim:7:function TmuxActivePane()

from nvim-r.

mccurdyc avatar mccurdyc commented on September 16, 2024

I even tried installing Nvim-R as a Vimball file (version 0.9.3) and removing and cleaning the plugged version.

from nvim-r.

mccurdyc avatar mccurdyc commented on September 16, 2024

@jalvesaq Thank you for all of your help. I found the issue to be this line in my .vimrc.

set ft = R

from nvim-r.

LiNk-NY avatar LiNk-NY commented on September 16, 2024

I had the same problem as Jim.
I thought it had something to do with Tmux but the let g:R_tmux_split = 1 in the .vimrc fixed it.

from nvim-r.

jalvesaq avatar jalvesaq commented on September 16, 2024

I installed the development version of Tmux (2.4) and it works with both options R_tmux_split=0 and R_tmux_split=1.

from nvim-r.

LiNk-NY avatar LiNk-NY commented on September 16, 2024

Hi Jakson,
Thanks for looking into this. I was getting a NvimR "server" error when entering F2 to connect to R. But it's working reliably now.

from nvim-r.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.