Ⅰ. 插件描述
Chess files: syntax, ftplugin and snippetsⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/chess-files-pgn-extension'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/chess-files-pgn-extension'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/chess-files-pgn-extension'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/Chess-files-.pgn-extension
Ⅳ. 文档说明
- Syntax highlighting for .pgn files
- Abbreviations and mappings:
- oo O-O
iabbrev OO O-O
iabbrev 00 O-O
iabbrev ooo O-O-O
iabbrev OOO O-O-O
iabbrev 000 O-O-O
inoremap <buffer> > 1-0
inoremap <buffer> < 0-1
imap <buffer> pw ♙
imap <buffer> pb ♟
imap <buffer> rw ♖
imap <buffer> rb ♜
imap <buffer> nw ♘
imap <buffer> nb ♞
imap <buffer> bw ♗
imap <buffer> bb ♝
imap <buffer> qw ♕
imap <buffer> qb ♛
imap <buffer> kw ♔
imap <buffer> kb ♚
- Commands:
ChessBoardEcho
ChessBoardPrint
ChessNormalize (1. e4 e5 2. -- -- 3. -- -- TO one move per line)
- snipMate snippets:
skel
skeleton
= -> 1/2-1/2
== -> 1/2-1/2
1/2 -> ½
12 -> ½
- Bonus:
If you write one move per line,
the plugin will automatically add the correct number for the following move