From 4c2aae516a0cde654cc4d17e2fae6846fa8c1551 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 15 Jan 2015 17:33:39 -0500 Subject: ftplugin/python.vim: Add map to quickly insert debug statement Create a python-specific map (gdo and gdO) that inserts import ipdb; ipdb.set_trace() either above or below the current line. I got tired of having to type it all the time. --- ftplugin/python.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ftplugin/python.vim') diff --git a/ftplugin/python.vim b/ftplugin/python.vim index 811f03a..7ebcbae 100644 --- a/ftplugin/python.vim +++ b/ftplugin/python.vim @@ -14,3 +14,8 @@ setlocal textwidth=79 inoremap nnoremap o o nnoremap O O + + +" Quickly add a debug line +nnoremap gdo oimport ipdb; ipdb.set_trace()_ +nnoremap gdO Oimport ipdb; ipdb.set_trace()_ -- cgit v1.2.3