Comments (6)
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.
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.
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.
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.
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.
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)
- \aa \ae and echo HOT 4
- Sporadic failures to send code chunks to R HOT 6
- vim-r & vim-markdown Rmd syntax highlighting no longer working HOT 13
- omnicompletion not working in .Rmd, .rnw HOT 11
- E364: Library call failed for "SendToRConsole()" HOT 7
- Rhelp is not working with vimpager HOT 4
- tmux settings have changed HOT 12
- \o not working for some cases. HOT 2
- Clear R console input before send R code from vim HOT 4
- ReplaceUnderS() not compatible with vim macros or repeat insert. HOT 4
- Sending command starting with a - (minus) sign HOT 3
- Ignoring Environment Variables on Windows HOT 9
- Running R code in Roxygen example sections does not work for visual selections HOT 12
- To remove extra spaces in vimrplugin_assign_map HOT 2
- tmux -V not available on OpenBSD HOT 2
- Issue with clipboard HOT 2
- [Regression] StartR fails with vim-r 1.2.9 HOT 2
- Vim-R-plugin was replaced by Nvim-R HOT 3
- Start 'tmux' before Vim. The X Window system is required to run R in an external terminal. HOT 1
- Can't see R documentation and plots HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-r-plugin.