参考文档:
Ubuntu 下安装 Pandoc 的步骤如下:
$ sudo apt-get autoremove pandoc #删掉之前的pandoc安装
$ sudo apt-get install cabal-install #安装Haskell包管理器
$ cabal update #获取Haskell包信息
$ cabal install pandoc #通过cabal安装pandoc
然后再把 ~/.cabal 加到路径中去,即在 ~/.bashrc 里加上一句
export PATH=/home/UserName/.cabal/bin:$PATH
安装好之后可以用 pandoc –version 校验是否安装成功。
使用 Vundle 管理 Vim 插件
为了使用 vim-pandoc,需要安装该插件,可以用 Vundle 来安装并管理 Vim 插件。
安装 Vundle 步骤如下:
$ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
之后配置插件:
将下述官方样例复制到 ~/.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 ‘gmarik/Vundle.vim’” The following are examples of different formats supported.
“ Keep Plugin commands between vundle#begin/end.
“ plugin on GitHub repo
Plugin ‘tpope/vim-fugitive’
“ plugin from http://vim-scripts.org/vim/scripts.html
Plugin ‘L9’
“ Git plugin not hosted on GitHub
Plugin ‘git://git.wincent.com/command-t.git’
“ git repos on your local machine (i.e. when working on your own plugin)
Plugin ‘file:///home/gmarik/path/to/plugin’
“ The sparkup vim script is in a subdirectory of this repo called vim.
“ Pass the path to set the runtimepath properly.
Plugin ‘rstacruz/sparkup’, {‘rtp’: ‘vim/’}
“ Avoid a name conflict with L9
Plugin ‘user/L9’, {‘name’: ‘newL9’}” 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
配置完插件信息之后可以在 Vim 命令模式下执行 :PluginInstall 来进行插件的自动安装。
安装 vim-pandoc
首先添加
Plugin ‘vim-pandoc/vim-pandoc’
Plugin ‘vim-pandoc/vim-pandoc-syntax’
到 ~/.vimrc 的相应位置,然后执行 :PluginInstall 即可。