
Turning Vim into an R IDE - beigebrucewayne
https://medium.com/@kadek/turning-vim-into-an-r-ide-cd9602e8c217
======
ssivark
I wonder about the point of torturing a minimalist text editor with no
graphics support (such as Vim into a comprehensive development and
visualization enviromment, by invoking several plugins and some very specific
workflows. Would it not make more sense to take the interface (modal editing,
etc) and wrap it into module that can be easily embedded into several
different IDEs, to handle text-specific tasks? That way, there is a fully
powered system that can handle all the other tasks that the text editor was
never designed to handle!

~~~
flukus
Alternately, would it make sense in R to separate the code and the result
instead of a WYSIWYG approach? This is how many work with tools like latex/pdf
(among others), edit the source in vim and have a viewer window open next to
it.

~~~
huac
That's (sort of) how RMarkdown works.

------
gradstudent
This article suggest a variety of plugins and then describes a fairly exotic
workflow that's alien to my vim brain. I use vim because it's simple, powerful
and available almost anywhere. By the time I've installed a bunch of non-
standard plugins and learned a set of tool-specific commands, I'm no longer
working with vim but some other IDE-type-thing that happens to run inside vim.

~~~
stewbrew
They basically talk about one single plugin: nvim-r, without linking to its
web page.

------
confounded
This is a superb write up.

As an Emacs/ESS user, I was rather embarrassed/traumatized to see how well
Ncm-R completion worked. I’d also somehow missed that there was a usable R LSP
implementation around.

------
thalesmello
As much as I love Vim and R, I think the experience is pointless without
embedded graphs. It would be perfect if it was possible to view a graph in a
Vim split.

~~~
stewbrew
If you want graphs, you're probably not working at the terminal anyway and
you're most likely using gvim that integrates nicely with our desktop
environment. You can display the R graphics next to the gvim window.

------
baldfat
> Why Not RStudio?

> Yes, I know RStudio has Vim keybindings, but it isn’t the real thing. At
> this point, I’m ruined by Vim.

I say the next step is that we have NeoVim running inside of RStudio. I also
think we will have that happening in VSCode a mind bending text editor inside
of a text editor.

~~~
beigebrucewayne
[https://github.com/Chillee/VSCodeNeovim](https://github.com/Chillee/VSCodeNeovim)

~~~
baldfat
I'm talking about the offical VSCode team's Vim extension.

[https://github.com/VSCodeVim/Vim#neovim-
integration](https://github.com/VSCodeVim/Vim#neovim-integration)

"We now have neovim integration for Ex-commands. To enable,..."

------
actuallyalys
This setup makes for an interesting blog post, but it goes too far toward
being an IDE for my taste. Part of what I like about Vim is that you can
customize it to be anything from just text editing—albeit fast and productive
text editing—to a full-blown (if hacked-together) IDE.

I think what I would like is a way to embed Vim or Neovim into Rstudio.
Rstudio's Vim mode is nice, but I'm too used to my own customizations. It
looks like people have experimented with doing this:
[https://github.com/jalvesaq/Nvim-R/issues/142](https://github.com/jalvesaq/Nvim-R/issues/142).

~~~
baldfat
> but it goes too far toward being an IDE for my taste

To be fair the Title is "Turning Vim into an R IDE :)

------
stewbrew
So the suggestion is to use the nvim-r plugin. This plugin uses a custom R lib
you have to compile yourself. This may not be possible in every situation.
While this is a nice solution for your personal work station, it sometimes
isn't in a corporate context.

------
j7ake
The argument of "why not use R studio" was not at all convincing for me.

R studio already has vim key bindings, so trying to make vim into rstudio-like
seems like spending time on the wrong problem. As in, even if you succeed
beyond your wildest dreams you're still not going to compete with R studio.

Things that make Rstudio great that is not so easy to implement include the
knitR integration and Rmarkdown integration and embedded graphs and most
importantly Rstudio server.

------
7kmph
"ruined by vim" \- that's the word I was looking for:)

------
partycoder
Vim is a good editor but not the right tool for the job.

Embedded charts are not a use case for Vim. Some R charts are interactive too.

Vim mode is available on some R IDEs.

