Last Updated: February 27, 2016·
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
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:
Written by Chris McKinnel
Have a fresh tip? Share with Coderwall community!
Post a tip
Best #Python Authors
Sponsored by #native_company# — Learn More