Ⅰ. 插件描述
Create a literate Vim configuration because reasons.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'thcipriani/literatevimrc'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'thcipriani/literatevimrc'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'thcipriani/literatevimrc'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/thcipriani/literate-vimrc
Ⅳ. 文档说明
# Literate Vimrc
"Literate" Vimrc is more than a bit of a misnomer. It, unlike Donald Knuth's
vision of Literate Programming, does not support a loosely coupled web of macros
-- instead it just lets you write a file in Markdown that has codeblocks (as
defined by v0.27 of the CommonMark spec)
containing Vimscript as your ~/.vimrc file.
Install
The intent of this plugin is to create a literate version of your ~/.vimrc
- As such, all that needs to be done is to copy the
autoload/literatevimrc.vimfile - your
~/.vim/autoloaddirectory, move your current~/.vimrcover to~/.vimrc.md
(ensuring that the contents of the file are in a Markdown fenced codeblock) and
add the line execute literatevimrc#load("~/.vimrc.md") to your, now empty, ~/.vimrc.
Step by step install
Clone this repo and move the autoload/literatevimrc.vim file to ~/.vim/autoload
git clone this ~/src/LiterateVimrc
mv ~/src/LiterateVimrc/autoload/literatevimrc.vim ~/.vim/autoload/Move your old ~/.vimrc flies to a Markdown file inside a fenced codeblock,
and call the plugin to parse your new "literate" ~/.vimrc.md inside your
actual ~/.vimrc.
echo "~~~" > ~/.vimrc.md
cat ~/.vimrc >> ~/.vimrc.md
echo 'execute literatevimrc#load("~/.vimrc.md")' > ~/.vimrc