Ⅰ. 插件描述
Vim script for using Unicode characters in Haskell source code, if appropriateⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'frerich/unicode-haskell'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'frerich/unicode-haskell'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'frerich/unicode-haskell'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/frerich/unicode-haskell
Ⅳ. 文档说明
unicode-haskell.vim - beautifies Haskell source code using Unicode characters
'unicode-haskell.vim' is a simple Vim script which will improve the way
Haskell source code is displayed in Vim/GVim by replacing certain character
sequences with appropriate Unicode replacements. The Unicode characters
are not written to disk but only used for display.
Screenshot
See http://imageshack.us/photo/my-images/840/unicodehaskell.png/ for a sample
of what Unicode characters this script uses in the editor.
InstallationIn case you're using something like https://github.com/tpope/vim-pathogen[Pathogen]
you can simply clone this repository into your 'bundle' directory:
cd ~/.vim/bundle
git clone git://github.com/frerich/unicode-haskell.git
Now 'unicode-haskell.vim' is installed.
Otherwise, simply copy the 'unicode-haskell.vim' file into the
'ftplugin/haskell' subdirectory of your vim configuration folder; that would be
'$HOME/.vimrc/ftplugin/haskell' on Mac OS/X and Linux and
'%HOME%vimfilesftpluginhaskell' on Windows.
Furthermore, the filetype plugin must be turned on so that vim picks up
this script and you should set the encoding to UTF-8 so that all the
fancy characters are actually displayed. Just add:
filetype plugin on
set encoding=utf-8
to your '.vimrc' or '.gvimrc' file.
Finally, make sure that you use 'gvim' with a Unicode font. On Mac OSX
the font DejaVu Sans Mono works very well. Add
if has("gui_running")
set guifont=DejaVu_Sans_Mono:h9
endif
to your '.vimrc' to use it.
Credits
'unicode-haskell.vim' was written by mailto:frerich.raabe@gmail.com[Frerich
Raabe].
This script is based on the http://www.vim.org/scripts/script.php?script_id=2603[Haskell
Cuteness] vim script by mailto:andrey.popp@braintrace.ru[Andrey Popp],
which in turn is based on the http://www.vim.org/scripts/script.php?script_id=284[unilatex.vim]