0

I am a happy user of nvim-R, which enables to send R markdown chunks to an R console with <localleader>ca. R cells code blocks look like this in R markdown files:

```{r}
head(faithful)
```

When I edit python code, I send code to the console with vim-slime. I use the slime key combination ctrl-c ctrl-c to send a line of code and vip followed by ctrl-c to send a code block. I also sometimes edit jupyter notebooks that were converted to markdown files using jupytext. In that case the python cells look like this:

```python
from plotnine.data import faithful
faithful.head()
—

My current strategy is to either select those lines or to introduce space above an below for easy selection with vip. But I think there can be a better way.

How can I create a key combination that sends the content of this code cell to a tmux pane with slime?

Related issue: https://github.com/jpalardy/vim-slime/issues/295

Related plugin: https://github.com/hanschen/vim-ipython-cell

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.