MacVim and R plugin

92 views
Skip to first unread message

Federico Calboli

unread,
Mar 14, 2012, 10:18:05 AM3/14/12
to vim_mac
Hi,

I am using MacVim (the latest Lion version, on the latest Lion) and I
am using this plugin:

http://www.vim.org/scripts/script.php?script_id=2628

http://www.lepem.ufc.br/jaa/vim-r-plugin.html

which works, but might work better. In iTem2 calling \rf creates an
instance of R in the same window (thanks to screen and tmux I guess),
while in MacVim \rf opens an instance of R.app. I'd like to have my
vim generate R session in the same vim window (like I get for vim in a
shell)... Is there any way of achieving this (http://www.lepem.ufc.br/
jaa/vim-r-plugin_object_browser_2.png) in MacVim?

BW

F

Sylvain Soliman

unread,
Mar 14, 2012, 10:28:31 AM3/14/12
to vim_mac
Hi,

* Federico Calboli <f.ca...@gmail.com>:

I'm neither on Lion nor using R but what you want seems pretty close to
what ConqueTerm provides.

:ConqueTermSplit <whatever command launches R>

If you need to 'send' content from your file to the R session you will
probably need to remap the default ConqueTerm keys...

[I use ConqueTerm a lot, mainly with (i)python or bash sessions, it is not
bug-free but often good enough]

HTH

Sylvain

--
Sylvain Soliman <Sylvain...@m4x.org> GnuPG Public Key: 0x0F53AF99
Page personnelle http://contraintes.inria.fr/~soliman/

Federico Calboli

unread,
Mar 14, 2012, 10:45:57 AM3/14/12
to vim_mac
On Mar 14, 2:28 pm, Sylvain Soliman <Sylvain.Soli...@m4x.org> wrote:
> I'm neither on Lion nor using R but what you want seems pretty close to
> what ConqueTerm provides.
>
> :ConqueTermSplit <whatever command launches R>
>
> If you need to 'send' content from your file to the R session you will
> probably need to remap the default ConqueTerm keys...
>
> [I use ConqueTerm a lot, mainly with (i)python or bash sessions, it is not
> bug-free but often good enough]

that helps a lot BUT does not technically work, because if I send a
line of of R code from Vim to R, it does not send it to the R session
opened by Conque Shell, but still to the R.app...

F

Sylvain Soliman

unread,
Mar 14, 2012, 11:05:05 AM3/14/12
to vim_mac
* Federico Calboli <f.ca...@gmail.com>:

> that helps a lot BUT does not technically work, because if I send a
> line of of R code from Vim to R, it does not send it to the R session
> opened by Conque Shell, but still to the R.app...

Well, that's because you now need to replace the mappings of the R plugin
with corresponding ones in Conque.

If it is enough for you, Conque already defines a command to send the
visual selection (you can remap ConqueTerm_SendVisKey), otherwise you can
use the conque_term#send_selected() and
conque_term#get_instance().write() functions in more complex mappings...

You might also probably get some help from the R plugin designer.

Best,

Reply all
Reply to author
Forward
0 new messages