R-nvim / R.nvim

Neovim plugin to edit R files
GNU General Public License v3.0
129 stars 15 forks source link

Escaping single quotes when sending to R console #73

Closed typhooncamel closed 4 months ago

typhooncamel commented 4 months ago

When sending code to the R console (on tmux), all single quotes appear to be escaped and come back with error. There is no problem when there are no single quotes, or when there are double quotes.

For example: library(tidyr) runs fine, library("tidyr") runs fine, library('tidyr') leads to

> library('\\''tidyr'\\'')
Error: unexpected string constant in "library('\\''tidyr'"
jalvesaq commented 4 months ago

Thanks for reporting the bug. Escaping single quotes was required in VimScript, but not in Lua.