Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'su324749/vim-instxt'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'su324749/vim-instxt'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'su324749/vim-instxt'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/su324749/vim-instxt
Ⅳ. 文档说明
##vim-instxt
- This is a vimscript for inserting text into the first line on current buffer.
Required Settings
- Set the string to be searched. (">|****|")
let g:instxt_string = ["c", "py"]- Full path of the template file.
let g:instxt_path = "~/template.txt"Usage
Insert a text sandwiched between ">|****|" and "||<" into the current buffer.
:In c<CR>
or
:In py<CR>template.txt: >
>|c|
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Hello, World\n");
return 0;
}
||<
>|py|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
if __name__ == '__main__':
print("Hello, World\n")
||<License
MIT
- see LICENSE