Ⅰ. 插件描述
stopwatch timing of execution time of vim commands and command sequencesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/timing-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/timing-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/timing-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/timing.vim
Ⅳ. 文档说明
This script provides the TIM command which measures execution time vim takes to execute given commands up to microsecond resolution (actual resolution depends on OS).
Example:
TIM 2000 let x=0 " How much time is takes to do 'x=0' 20000 times ?
If first argument after TIM is a number, it is treated as repetiion count.
If first argument is not a number, the command is executed once.
Multiple commands, separated by bars(|) can be used under TIM command:
TIM 100 e xxx | bd "How much time it takes
" to open and close the buffer 100 times