vim-breakpoint


Ⅰ. 插件描述

A simple plugin for placing and displaying breakpoints in Vim

Ⅱ. 基本信息

创建日期:  2017-09-24
使用用户:  1
Github星:  6
插件作者:  Hugo Hörnquist

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Vim Breakpoint

Vim 8.1

Vim 8.1 changed the output of sign listings, v8.1 solves this program.


Vim breakpoint is a plugin for easily placing breakpoints from inside Vim.

It saves and reads breakpoints from $FILEPATH/.breakpoints_$FILENAME.

Currently it only supports GDB style breakpoints, but this could easily be
extended if I could be bothered.

Currently doesn't delete breakpoint even if line is deleted. This is
however not a large problem, since it is still apparent where the
breakpoints are.

  1 #include <stdio.h>
  2 #include <string.h>
  3 
  4 int main() {
  5     printf("%i\n", strcmp("Hello", "Hello"));
* 6     printf("%i\n", strcmp("hello", "Hello"));
  7     printf("%i\n", strcmp("Nothing", "Hello"));
  8 }

An "image" of vim with a breakpoint on line 6

Installation

Since a few versions back this plugin requires Vim 8.
The old version which still works with Vim 7 is available
under the tag v7.

If using vim-plugged then the following can be put in
your vimrc to automatically get the correct version:

if version >= 800 |Plug 'HugoNikanor/vim-breakpoint'
else              |Plug 'HugoNikanor/vim-breakpoint', {'tag': 'v7'}

Usage

The breakpoints save to file whenever you save a file with breakpoints
in it, and also automatically loads a breakpoint file if there is any.

For full usage documentation see :help breakpoint

The plugin doesn't bind any keys by itself, so that's up to the user.
I would recommend having the following in your vimrc after loading the plugin:

nmap <leader>a <Plug>BreakpointToggle

Commands

  • BreakpointPlace [line]
  • BreakpointRemove [line]
  • BreakpointToggle [line]
  • BreakpointSave
  • BreakpointLoad

添加新评论