Giter VIP home page Giter VIP logo

Comments (6)

mbojan avatar mbojan commented on July 22, 2024

You can create custom key bindings to evaluate any R expression you might
want (like a call to load_all() or check()). Have a look at section 8 of
vim-r-plugin documentation.

On Wed, Apr 10, 2013 at 12:15 PM, Michel [email protected] wrote:

Using the devtools R package (see
http://cran.r-project.org/web/packages/devtools/ and
https://github.com/hadley/devtools), utility vim commands for R package
developing could be easily integrated into your great plugin.

My current workflow consists of editing some R scripts and then switch to
the R pane and type load_all(".."), test(".."), check(".."), install("..")... which is obviously not really efficient.

A simple heuristic (checking if the R script is in a directory named 'R'
and the parent directory contains a DESCRIPTION file) could be used to
switch commands/shortcuts on and off.


Reply to this email directly or view it on GitHubhttps://github.com//issues/40
.

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on July 22, 2024

As Michał Bojanowski has pointed out, the plugin documentation explains how to create new key bindings. Please search for "RAction" in the documentation and read the following paragraphs. You have made an interesting suggestion, but not all R users develop packages and not all package developers use devtools. I don't use devtools and I'm not willing to support its integration with the plugin, but I can easily add support to arbitrary additions (plugins to Vim-R-plugin). It's just a matter of creating a new variable whose name could be vimrplugin_plugins or vimrplugin_source and making the plugin source scripts listed in this new variable. Another option of doing the same thing is to make the Vim-R-plugin source all scripts found in a directory such as r-plugin/plugins. What's your opinion about this?

from vim-r-plugin.

mllg avatar mllg commented on July 22, 2024

I believe that some kind of (pluggable) functionality for package developing (using Makefiles/devtools/...) is a great addition. Using devtools or not is of course a matter of taste, but would surely be really quick implementable.

Considering that many vim users manage their scripts nowadays with fugitive/vundle/..., the subdirectory plugin variant sounds inferior to me.

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on July 22, 2024

Thanks for your feedback! I added (and documented) the new option vimrplugin_source. Please, let me know if you either develop the devtools.vim or need help to develop it.

from vim-r-plugin.

mllg avatar mllg commented on July 22, 2024

Thanks. I've pushed a first rough version to https://github.com/mllg/vim-devtools-plugin

Any comments appreciated, I'm quite new to the vim scripting language.

And one particular question, because I did not read nor understood all of the code in the r-plugin:
Is there anything that needs to be done to improve the interplay with the r-plugin?

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on July 22, 2024

Very nice! I've called :RInstallInstallPackage and RLoadPackage and the commands have worked just fine.

I think you don't need to do anything else unless either you feel that something could be improved or an user requests a new feature.

I've added the github link to your plugin to section 6.26 of Vim-R-plugin documentation.

from vim-r-plugin.

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.