Ⅰ. 插件描述
Plugin copying code to clipboard formatted with line numbers and path to file.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'dominikduda/vim-yank-with-context'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'dominikduda/vim-yank-with-context'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'dominikduda/vim-yank-with-context'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/dominikduda/vim_yank_with_context
Ⅳ. 文档说明

vim_yank_with_context
Plugin copying code to clipboard formatted with line numbers and path to file.
Example output:
app/views/contractor_cost_summaries/show.html.haml ▾
--------------------------------------------------
7 .grid
8 .col-7_md-12
9 = render 'show_financial_overview'
10
11 .grid
12 .col-7_lg-10_md-12
13 = render 'show_contractors'Why should you use it?
- The plugin is good way to share your code even if your chat does not support block code format
- No more explaining where this fragment of code comes from
- Works out of the box!
Installation
via Plug, Neobundle or Vundle:
Plug 'dominikduda/vim_yank_with_context'
NeoBundle 'dominikduda/vim_yank_with_context'
Plugin 'dominikduda/vim_yank_with_context'via Pathogen:
git clone https://github.com/dominikduda/vim_yank_with_context.git ~/.vim/bundle/vim_yank_with_contextHow to use
Just enter visual line mode (V) and click the yank with context mapping (Control + y by default).
Customization (values written here are defaults)
Change yank with context mapping:
let g:vim_yank_with_context#yank_mapping = '<C-y>'