【发布时间】:2016-12-12 13:57:58
【问题描述】:
我想通过putty在远程机器上运行Nvim-R,当我尝试打开*.R文件时,远程机器返回错误消息:
请在你的 vimrc 中设置变量
g:R_term_cmd。阅读插件 文档...
根据documentation,,R_term_cmd应按以下方式使用:
如果
|R_in_buffer| = 0并且 X Window 系统正在运行并且 tmux 是 安装后,R 将在外部终端仿真器中运行。这 插件使用它在以下找到的第一个终端模拟器 列表:1. gnome-terminal, 2. konsole, 3. xfce4-terminal, 4. Eterm, 5. (u)rxvt, 6. aterm, 7. roxterm, 8. terminator, 9. lxterminal10。 xterm。
如果 Vim 没有选择你喜欢的 terminal 模拟器,你可以定义 在你的
vimrc中设置变量R_term,如下图:let R_term = "xterm"如果您的终端仿真器未在上面列出,或者您对终端仿真器的方式不满意 由插件调用,您可以在
vimrc中定义变量R_term_cmd,如下例所示:let R_term_cmd = "xterm -title R -e" let R_term_cmd = "xfce4-terminal --icon=/path/to/icons/R.png --title=R -x"
但是,通过Vim-R-Tmux: An Integrated Working Environment for R 提供的示例配置文件似乎没有使用此变量。另外vimrc中的设置:
" start R with F2 key
map <F2> <Plug>RStart
imap <F2> <Plug>RStart
vmap <F2> <Plug>RStart
" send selection to R with space bar
vmap <Space> <Plug>RDSendSelection
" send line to R with space bar
nmap <Space> <Plug>RDSendLine
<LocalLeader> 设置
建议的 <LocalLeader> 设置似乎不起作用,因为按 F2 不会启动连接的 R 会话。
软件版本
tmux 2.3
VIM - Vi IMproved 8.0
【问题讨论】:
-
也许 Nvim-R 的问题跟踪器是更好的地方问?
-
@Kent 感谢您的关注;我最初的看法是我的配置不正确,我遗漏了一些明显的东西,而不是
Nvim-R有问题。我认为通过 Nvim-R 运行是相当普遍的,然后有人会评论应该如何配置它。
标签: putty tmux terminal r linux vim ssh putty