debug.vim


Ⅰ. 插件描述

Simple utility to assist in debugging vim scripts

Ⅱ. 基本信息

创建日期:  2002-11-22
使用用户:  1
Github星:  1
插件作者:  kam onn siew

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/debug-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/debug-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/debug-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/debug.vim

Ⅳ. 文档说明

utility to help in debugging vim scripts
  put this in the plugin directory
  will add a new menu VIM->Debug->....
    menu options
      DebugOn - turns debug on - will display debug text in VIM scripts
      DebugOff - turns debug off - will not display debug text in VIM scripts
      Debug Status - displays debug status in status line
      Insert Debug Text - insert debug text in vim scripts

usage:
  eg in following vim script

1 fun! <SID>JavaImpGenerate()  
2    let impfile = tempname()
3    let currBuff = bufnr("%")
    
  for debugging, insert debug text in above script as follows
1 fun! <SID>JavaImpGenerate()  
2    call Debug("entering JavaImpGenerate")
3    let impfile = tempname()
4    call Debug("impfile = " . impfile )
5    let currBuff = bufnr("%")
6    call Debug("currBuff = " . currBuff )

The debugging stubs in lines 2, 4, 6 will run only if Debug status is on.

添加新评论