Ⅰ. 插件描述
Instant generation of unique tag inside your code sourceⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'aluriak/vim-deedee'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'aluriak/vim-deedee'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'aluriak/vim-deedee'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/aluriak/vim-deedee
Ⅳ. 文档说明
# Dee-Dee
Place random tags in your code using this vim plugin.
That is my first vim plugin, so there is probably a LOT of bad practices used here.
I heavily used python-vim doc, and was inspired by these pages:
learn vim script the hard way,
scripting vim with python, and
vim plugins in python.
installation
Copy paste deedee.{vim,py} in your .vim/plugin/ dir, or use {plug,pathogen,…}:
Plug 'aluriak/vim-deedee'
example
Follows a random source code, with the cursor marked as '§':
def func():
print('§')
Then, after the ':Deedee' command:
def func():
print('ASQPQE§')
options (and their default values)
let g:DeedeeSize = 6
Size of the tag to generate.
let g:DeedeeMode = 'a' # (all) or 'b' (current buffer) or 'n' (none)
a is for All: the tag will not match with any line in all opened buffers b is for Buffer: the tag will not match with any line in current buffer n is for None: No verification of doublons
let g:DeedeeAlphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
Letters that can be used for tags. You can add any character.
Rationale
When logging in the code, instead of describe from where the logging occurs, just provides a random tag.
You could then find the relevant logging with something like grep -rnI --color . -e "tag" or alias.
Name comes from random id -> rand id -> did -> didi -> deedee