Giter VIP home page Giter VIP logo

Comments (10)

jalvesaq avatar jalvesaq commented on July 22, 2024

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.

mcooganj avatar mcooganj commented on July 22, 2024

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.

jalvesaq avatar jalvesaq commented on July 22, 2024

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.

mcooganj avatar mcooganj commented on July 22, 2024

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.

jalvesaq avatar jalvesaq commented on July 22, 2024

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.

mcooganj avatar mcooganj commented on July 22, 2024

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.

mcooganj avatar mcooganj commented on July 22, 2024

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.

jalvesaq avatar jalvesaq commented on July 22, 2024

I noted that the \kp shortcut was doing nothing if the vimcom package wasn't installed.

from vim-r-plugin.

mcooganj avatar mcooganj commented on July 22, 2024

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.

jalvesaq avatar jalvesaq commented on July 22, 2024

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)

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.