Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'sillybun/setbreakpoints-python'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'sillybun/setbreakpoints-python'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'sillybun/setbreakpoints-python'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/sillybun/setbreakpoints_python
Ⅳ. 文档说明
# setbreakpoints_python
Introduction
This is a plungin aimed to facilitate inserting and removing breakpoints in python script. It enables user to add/remove set_trace() to the code swiftly, and therefore be ready for pbd – The Python Debugger. Python3 support compilation in Vim is required.
Installation
Use your plugin manager of choice.
git clone https://github.com/sillybun/setbreakpoints_python ~/.vim/bundle/setbreakpoints_python
- Add
Bundle 'https://github.com/sillybun/setbreakpoints_python'to .vimrc - Run
:BundleInstall
- Add
- Add
NeoBundle 'https://github.com/sillybun/setbreakpoints_python'to .vimrc - Run
:NeoBundleInstall
- Add
- Add
Plug 'https://github.com/sillybun/setbreakpoints_python'to .vimrc - Run
:PlugInstall
- Add
Usage
Add this into your .vimrc:
autocmd FileType python nnoremap <F12> :call ToggleBreakPoint()<Cr>When you want to insert or remove a breakpoint at a certain sentence, just click F12.
Troubleshooting
- If
E319: Sorry, the command is not available in this version: python3 import sysraised:
Please check if your vim support +python3, by :version(within vim) or vim --version | grep python3 (Terminal). If +python3 is supported, please refer to (2), otherwise see Building Vim from source.
- +python3 is shown in version, but
:echo has('python3')gives 0:
This means vim cannot configure python3 library successifully, you may manually compile vim with --with-python3-config-dir=$PYTHON3PATH where $PYTHON3PATH is the path of your python3.
For conda users, pre-compiled macvim is recommended since it may turns complicated with the dylib.