/vim-pybreak

Vim function for toggling pdb.set_trace statement at cursor position

Primary LanguageVimLGNU General Public License v3.0GPL-3.0

vim-pybreak

Vim function for toggling pdb.set_trace statement at cursor position

installation

Prefered way of installing this plugin (as with any other script) is by installing it as a git submodule, and loading it with pathogen (for pathogen installation instructions, please refer to https://github.com/tpope/vim-pathogen or http://www.vim.org/scripts/script.php?script\_id=2332). When you have pathogen installed, installing pybreak is as simple as:

git clone git://github.com/nthorne/vim-pybreak.git bundle/pybreak

usage

  • <localleader>d - inserts a set_trace statement after the cursor position if no statements (as inserted by pybreak) are found on the current line. If, however, any set_trace statements are found at the current line, they are removed, and no further set_trace statements are inserted.
  • <localleader>D - as <localleader>d, with the minor difference that this keymapping inserts the set_trace statement at the cursor position.
  • <localleader>da - removes all set_trace statements in the active buffer
  • <localleader>de - toggles set_trace (see <localleader>d), writes the buffer to disk, and then executes the file with the python interpreter.

license

Copyright (C) 2012 Niklas Thörne. This plugin is distributed under the GNU General Public License version 3.