【发布时间】:2015-12-16 14:10:19
【问题描述】:
我刚刚安装了 vim-rmarkdown、vim-pandoc 和 vim-pandoc-syntax 插件以及 Vundle(最新的 github 版本)。
当我在 vim 中打开一个 RMarkdown 文件 (.Rmd) 时,正如预期的那样,它检测到文件类型为 rmarkdown;它用 lambda 符号等标记 R 代码块的开始(替换 ```),正如我在示例 vim-rmarkdown 屏幕截图中看到的那样。
让我发疯的是 vim 决定突出显示一些字符串(无益地完全遮盖了文本,就好像它被编辑了一样)。我通常会点击空格来清除搜索词的突出显示;不是这样。它还隐藏了 R 块的终止 ```;仅当您将光标移到该行上时它们才可见。
谁能帮忙:
- 指向 vim-rmarkdown 常见问题解答/文档的指针(:h rmarkdown 仅调用您在 github 页面上获得的相同基本信息),
- 为什么会覆盖(用纯色突出显示)某些文本以及如何阻止它,
- 如何显示 R 代码块 (```) 的结尾,或者更好地区分“文本”和 R 代码块。
根据可用的 vim-rmarkdown 文档,我在 .vimrc 的开头添加了以下内容
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'vim-pandoc/vim-pandoc'
Plugin 'vim-pandoc/vim-pandoc-syntax'
Plugin 'vim-pandoc/vim-rmarkdown'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
【问题讨论】:
标签: r vim r-markdown vim-plugin