9 ms·
Turning Vim into an R IDE
- actuallyalys 9y agoThis 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 9y ago> but it goes too far toward being an IDE for my taste To be fair the Title is "Turning Vim into an R IDE :)
- confounded 9y agoThis 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.
- gradstudent 9y agoThis 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 9y agoThey basically talk about one single plugin: nvim-r, without linking to its web page.
- thalesmello 9y agoAs 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.
- baldfat 9y agoI used TMux to do exactly that. It worked good BUT RStudio is so good. The enemy of Vim with R is RStudio. It works so well for me I haven't fired up Vim with R in over 3 years. Also I find RStudio Vim to be good enough for me.
- voxadam 9y agoThis sounds like an excellent use case for withoutboat's[1] (aka tatterdemalion[2]) notty[3] terminal protocol project. [1] https://github.com/withoutboats https://github.com/withoutboats [2] https://news.ycombinator.com/user?id=tatterdemalion https://news.ycombinator.com/user?id=tatterdemalion [1] https://github.com/withoutboats/notty https://github.com/withoutboats/notty
- stewbrew 9y agoIf 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.
- petepete 9y agoCould Tektronix emulation somehow be used for this? Then you could, in theory, display graphs in a vim/tmux split http://www.cmbi.ru.nl/~schaft/mxterm/pictures/tek.gif http://www.cmbi.ru.nl/~schaft/mxterm/pictures/tek.gif
- ssivark 9y agoI 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!
- scrollaway 9y agoThat is one of the goals of neovim. And it's even being put to the test: The VSCode-vim team is indeed working on a neovim integration.
- brian-armstrong 9y ago)
- flukus 9y agoAlternately, 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 9y agoThat's (sort of) how RMarkdown works.
- stewbrew 9y agoOh come on, they're talking about interacting with R. I hope you're aware that R is a simple interpreter and any IDE for R is mostly a window manager that arrangs views on the source code, the REPL, and the graphic display if available. Also: vim isn't vi. Vim isn't minimalist
- hatmatrix 9y agoCan not Spacemacs + ESS fill the gap?
- baldfat 9y ago> 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 9y agohttps://github.com/Chillee/VSCodeNeovim https://github.com/Chillee/VSCodeNeovim
- baldfat 9y agoI'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,..."
- partycoder 9y agoVim 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.
- stewbrew 9y agoSo 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.
- 7kmph 9y ago"ruined by vim" - that's the word I was looking for:)
- j7ake 9y agoThe 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.