Code Monkey home page Code Monkey logo

r.vim's Introduction

This is a mirror of http://www.vim.org/scripts/script.php?script_id=1048

Send R code from a VIM buffer to R on Unix type systems using funnel.pl from vimscript #221. Contains

README.R_with_vim
ftplugin/r.vim
ftplugin/rnoweb.vim
ftplugin/funnel.pl
syntax/rhelp.vim
syntax/rnoweb.vim
Makefile.rnoweb

Fernando Henrique Ferraz Pereira da Rosa is now a coauthor of this plugin (starting from version 0.03). He helped me fixing a bug and started the syntax file for mixed highlighting of Latex and R syntax (syntax/rnoweb.vim).

I set up a small project page for this plugin, featuring a screenshot:

http://www.uft.uni-bremen.de/chemie/ranke/?page=vim_R_linux

You can browse the subversion repository where these files are at home: http://kriemhild.uft.uni-bremen.de/viewcvs/?root=vim

Alternatives for Mac Os X include vimscript #1741 and vimscript #2104.

Under Windows, I am now using a quite simple solution, consisting of the installation of the rcom package for R which requires statconnDCOM from http://rcom.univie.ac.at and ActiveState Perl in the PATH (watch out if you use R tools, because GNU perl does not have the DCOM interface, so ActiveState perl needs to be first in the path).
My ftplugin/r.vim under Windows:

perl << EOF
sub rsourceclipboard
{
    use Win32::OLE;
    my $R = Win32::OLE->GetActiveObject('RCOMServerLib.StatConnector')
          || Win32::OLE->new('RCOMServerLib.StatConnector');
    $R->Evaluate("source('clipboard', echo=TRUE)");
    $R->Close;
}
EOF

vnoremap <buffer> r "*y:perl rsourceclipboard<CR>

This means that the visual selection is pasted to the clipboard and the clipboard content is sourced by R when the key "r" is pressed in visual mode.




r.vim's People

Contributors

jranke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.