Comments (10)
The shortcut <LocalLeader>kn does just this. Wasn't it working? What is sent to R Console when you do <LocalLeader>kn and <LocalLeader>kp? What are the error messages, if any? The function RKnit() is located at r-plugin/common_global.vim.
from vim-r-plugin.
nothing is sent -- that's why i want to try the hack to isolate the
problem. Is there some code i might add to my .vimrc so that i can try and
identify if the problem is in the plugin or elsewhere?
On 4 August 2013 10:21, Jakson Alves de Aquino [email protected]:
The shortcut kn does just this. Wasn't it working? What is sent to R
Console when you do kn and kp? What are the error messages, if any? The
function RKnit() is located at r-plugin/common_global.vim.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/48#issuecomment-22064485
.
from vim-r-plugin.
Is the file being edited an Rnoweb one? The keybindings <LocalLeader>kn and kp are available only for Rnoweb, rrst and rmd files. Do the other shortcuts work? Perhaps the kn and kp commands are already mapped to something else. You can check this with the Normal mode command :map
You can also try the minimum vimrc below to check whether the problem is in your vimrc:
set nocompatible
syntax enable
filetype plugin on
filetype indent on
from vim-r-plugin.
Yes i am editing a .rnw file.
Neither \kn and \kp work. The global leader is , so there ought not be
conflicts -- hence my desire to try rolling my own vim function that will
send knit(path/to/file) to the console.
How might i do this? I cannot figure out how to target the console with my
string.
On 04/08/2013, at 11:45 AM, Jakson Alves de Aquino [email protected]
wrote:
Is the file being edited an Rnoweb one? The keybindings kn and
kp are available only for Rnoweb, rrst and rmd files. Do the other
shortcuts work? Perhaps the kn and kp commands are already mapped to
something else. You can check this with the Normal mode command :map
You can also try the minimum vimrc below to check whether the problem is in
your vimrc:
set nocompatible
syntax enable
filetype plugin on
filetype indent on
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/48#issuecomment-22065265
.
from vim-r-plugin.
As I've said in my first reply, the code that sends the the knit command to R Console is the function RKnit(), located at r-plugin/common_global.vim. Please, look at it. Maybe what you want is:
nmap <silent> <LocalLeader>kn :call SendCmdToR('require(knitr); knit("' . expand("%:t") . '")')<CR>
from vim-r-plugin.
Thanks. Sorry, i was being a bit thick.
On 05/08/2013, at 12:38 AM, Jakson Alves de Aquino [email protected]
wrote:
As I've said in my first reply, the code that sends the the knit command to
R Console is the function RKnit(), located at r-plugin/common_global.vim.
Please, look at it. Maybe what you want is:
nmap kn :call SendCmdToR('require(knitr);
knit("' . expand("%:t") . '")')
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/48#issuecomment-22072713
.
from vim-r-plugin.
Things work fine on my mac, but on my windows box the knit functions don't
work.
To check i defined the map as you suggested and it failed due to the
backslashes. To fix it, i defined the following map. This did the trick.
noremap kk :call SendCmdToR('require(knitr);
\ knit("' . tr(expand("%:p"), '', '/') . '")')
On 05/08/2013, at 12:38 AM, Jakson Alves de Aquino [email protected]
wrote:
As I've said in my first reply, the code that sends the the knit command to
R Console is the function RKnit(), located at r-plugin/common_global.vim.
Please, look at it. Maybe what you want is:
nmap kn :call SendCmdToR('require(knitr);
knit("' . expand("%:t") . '")')
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/48#issuecomment-22072713
.
from vim-r-plugin.
I noted that the \kp shortcut was doing nothing if the vimcom package wasn't installed.
from vim-r-plugin.
Vimcom is installed.
On 19/08/2013, at 1:11 PM, Jakson Alves de Aquino [email protected]
wrote:
I noted that the \kp shortcut was doing nothing if the vimcom package
wasn't installed.
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/48#issuecomment-22848716
.
from vim-r-plugin.
I'm closing this issue because I can't reproduce the bug and you have already solved your problem.
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.