Git Product home page Git Product logo

Comments (8)

jalvesaq avatar jalvesaq commented on September 16, 2024

I did not know about them. Thanks for the news! How can I see R running inside a Vim's buffer through slimv? I already installed slimv. What should I do now? I did not find instructions on how to install swank-r for Vim.

You can change all Nvim-R key bindings. Please, see :h Nvim-R-key-bindings.

from nvim-r.

phmarek avatar phmarek commented on September 16, 2024

Hi, thanks for the quick answer!

Well, I'm using this ~/.vim/after/syntax/r.vim:

let g:swank_port=4009
let g:slimv_swank_cmd='!nohup setsid /usr/bin/xterm -e R -e "X11(); while (1) { swank() }" > /tmp/swankr.txt 2>&1 &'

let g:slimv_simple_compl=1

setlocal iskeyword-=*
setlocal iskeyword-==
setlocal iskeyword-=[
setlocal iskeyword-=]

:nnoremap <f2> "ryap"r:call SlimvEvalRegion()<CR>
:nnoremap <f3> "syap"s:call SlimvEvalSelection("t", getreg("r"))<CR>

along with the R parts from https://github.com/phmarek/swankr.

Yes, I know that I can change all key bindings (and have done so for too many plugins already) - but having some way to get them compatible out-of-the-box via a single :let g:...= would be nice, too!

from nvim-r.

jalvesaq avatar jalvesaq commented on September 16, 2024

Today, I had time to look at swank. It is interesting to see R running in a Vim's buffer, but it has some bugs, e.g., when I pressed the backspace key there was an error. Neovim terminal is definitively better.

Regarding your question, there is no way of changing the key bindings other than mapping the <Plug>s one by one because the default key bindings are hard-coded in R/common_global.vim and ftplugin/*.vim. And I cannot change the default key bindings because they are in use for years now.

from nvim-r.

jalvesaq avatar jalvesaq commented on September 16, 2024

I am closing the issue. If someone has a better solution than mapping the <Plug>s, please, either reopen the issue or make a pull request.

from nvim-r.

phmarek avatar phmarek commented on September 16, 2024

Sorry for not responding earlier; I'd have hoped for a 2nd set of bindings in that script, that are used via simply changing a single configuration parameter - like :set g:R_use_slimv_compatible_keys=1...

from nvim-r.

jalvesaq avatar jalvesaq commented on September 16, 2024

I could accept a pull request for this if the other software were highly popular. I guess this is not the case of slimv. So, in my opinion your demand is very specific, and in this case I think it would be more appropriate if someone could write a Vim script to be listed as part of R_source. Please, see:

:h R_source

from nvim-r.

mdlerch avatar mdlerch commented on September 16, 2024

@phmarek , are you aware that you can map to your own liking in your own config? You don't need to use the defaults?

ftplugin/r.vim

map <buffer> ,eb <Plug>RSendFile

etc...

from nvim-r.

phmarek avatar phmarek commented on September 16, 2024

@mdlerch, yes, I know.

But I guess there'll be quite a few people using slimv already - and why should each of them configure the keys on her own?

from nvim-r.

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.