jalvesaq / Nvim-R

Vim plugin to work with R
GNU General Public License v2.0
966 stars 125 forks source link

Should I use this as a R newbie? #537

Closed quantum-booty closed 4 years ago

quantum-booty commented 4 years ago

I just started learning R yesterday, and I am already getting frustrated by the built in vim support of R Studio. After digging around, I found this plugin. So my question is, what are the limitations of this plugin? What important feature would I be missing out? Would using Nvim-R hinder my learning progress? Would you recommend it to a R newbie?

jalvesaq commented 4 years ago

This is a personal question. There is no single answer for everyone. You could try both RStudio and Nvim-R and keep using whatever best fits you. If you already have fun using either Vim or Neovim, then you might like Nvim-R.

mschilli87 commented 4 years ago

I would say being a vim user but R novice you'll have an easier experience with this plugin than RStudio. I would recommend to also get autocompletion via ncm2 if you miss that from a full blown IDE. The main 'problems' are that not all macros from RStudio have a matching binding so you might have to actually learn what those do to set them up. But I am not aware of anything important that you could do with RStudio but not with this plugin.

quantum-booty commented 4 years ago

Thank you @jalvesaq, I will try both :) @mschilli87 I can't get ncm2 ncm-R to work, it looks like it's no longer maintained. \rf to start R data(iris) run with \d iris$ and no autocompletion comes up, I am expecting the variables to pop up.


call plug#begin('~/.config/nvim/plugged')
Plug 'ncm2/ncm2'
Plug 'roxma/nvim-yarp'
Plug 'jalvesaq/Nvim-R'
Plug 'gaalcaras/ncm-R'
Plug 'ncm2/ncm2-bufword'
Plug 'ncm2/ncm2-path'
call plug#end()

autocmd BufEnter * call ncm2#enable_for_buffer()    
set completeopt=noinsert,menuone,noselect

Edit: It looks like both coc and the new nvim-lsp supports r language server. I will be using these instead off ncm2.