Ⅰ. 插件描述
Sets text width and formatting options for manuscript editingⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/manuscript-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/manuscript-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/manuscript-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/manuscript.vim
Ⅳ. 文档说明
Manuscript format is the page layout in which most editors prefer to receive writers' submittals of text (novels, short stories, etc.) for publication. This small script sets text to 60 columns/five character tabs, reasonable defaults for editing a manuscript as plain text. Printing is set to 12-point Courier.
It doesn't do much more than this; page headers and line spacing is not automatically set correctly in printed output. Nonetheless I have provided it in the hope that someone will find it useful.
Type ":setfiletype manuscript" from within Vim to run the script.
Use the following line in your .vimrc file to associate manuscript.vim with the ".manuscript.txt" file extension:
au BufNewFile,BufRead *.manuscript.txt setf manuscript
Use the following six lines in your .vimrc file to add some useful key mappings (_mf, _mF and _MF):
" Use _mf to reformat whole document, paragraphs wrapped to 60 columns.
map _mf :setlocal tw=60 ts=5 sts=5 et sw=5 noai fo+=aw2tq nonu<CR>ggVGgq
" Use _mF to remove excess linefeeds/spaces, useful before issuing _MF.
map _mF :%s/^[n t]+/r/<CR>
" Use _MF to reformat with newlines only at the end of each paragraph.
map _MF :setlocal tw=99999999 nu<CR>ggVGgq