Vi mode in console window

Vim mode works in the editor, but how can I activate it in the console ?

Don’t think you can. It’s possible when using neovim as an IDE with the right combination of LSP and other features.

Ok, thanks, but there was another post on the same subject and I did not understand what the original author had done, nor why the person who replied asked if it now worked in the new release of Rstudio : maybe you can take a look and tell me if perhaps you understand?

https://forum.posit.co/t/how-to-make-vim-work-in-the-console-window/41044/3

That was about using it in the source pane. You can run it in the terminal pane, but not the console. I would love the option because I’ve been using vi before it was vim, going on 40 years.

Vi fanboy here too :slight_smile: Two last things then:

  1. we can have vim mode in the terminal window, since it is a regular terminal and it relies on the bash configuration. Is it possible to use the terminal as the console, I mean redirect the source code to it instead of the console? You have certainly investigated that possibility, but I was just wondering if the source/console relation was super-specific and not possible to replicate.

  2. have you used R inside Jupyter(Lab) ? I use it and it has a very nice vim mode, while allowing the integration with graphics and all those good things. So I was wondering what I'd lose if I moved from Rstudio to Jupyter.

  1. Let's cut off the middleman, taking RStudio out of the equation and think about just CLI. And the answer is that you can send terminal stdout to R with the {sys} package, but that won't work the other way around. You can write objects to file and so long as they are not serialized you can use system() to pipe them into a bash session. I think, though, that it just won't be in an open terminal system without a lot of heavy lifting that I am no longer up for.

  2. I'm back to using jupyter after a long hiatus as an IDE for julia, which works well for the snippets I'm taking baby steps with. For python, I liked it as a literate programming tool, but preferred iPython for script development. Within R, {reticulate} is a nice compromise. As far as what you'd give up, it's the other RStudio panes besides source and console. They'd no longer be integrated. I'd also miss the file browser and help.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.