Add an abbreviation for IPDB in vim
I find myself using IPDB all the time when I'm debugging either my own, or others' code, after typing it a few times myself I realised how much of a waste of time it was.
Now I have this sweet abbreviation in my vimrc
:
ab ip import ipdb; ipdb.set_trace()
So I can type ip<Space>
in insert mode, and it will spit out import ipdb; ipdb.set_trace()
.
Coupled with my save shortcut, I can drop into IPDB in literally about 2 seconds flat from anywhere in my code, which is pretty gravy: ip<Space>jj
.
Written by Chris McKinnel
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#