I'm using MacVim, and I want to write codes for R in MacVim.
I want to have a hotkey which can:
- Send a line where the cursor is in MacVim to RStudio, execute the code in RStudio, and back a cursor to MacVim (line by line execution)
- If Visual Mode is used in MacVim, copy the chunk selected in MacVim and send it to RStudio (copy lines and paste on RStudio), execute the lines and back a cursor to MacVim (chunk execution)
Is it possible to realize this hotkey using what is prepared in Vim?