diff options
author | Teddy Wing | 2015-01-15 17:33:39 -0500 |
---|---|---|
committer | Teddy Wing | 2015-01-15 17:33:39 -0500 |
commit | 4c2aae516a0cde654cc4d17e2fae6846fa8c1551 (patch) | |
tree | fabe77fd6c1ff4d8dcc25d9436dfca0f7db07a68 /ftplugin/python.vim | |
parent | 7aa28e29a72710c06c5cdf83343b4967e3c7132c (diff) | |
download | dotvim-4c2aae516a0cde654cc4d17e2fae6846fa8c1551.tar.bz2 |
ftplugin/python.vim: Add map to quickly insert debug statement
Create a python-specific map (<leader>gdo and <leader>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.
Diffstat (limited to 'ftplugin/python.vim')
-rw-r--r-- | ftplugin/python.vim | 5 |
1 files changed, 5 insertions, 0 deletions
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 <buffer> <CR> <CR> nnoremap <buffer> o o nnoremap <buffer> O O + + +" Quickly add a debug line +nnoremap <buffer> <leader>gdo oimport ipdb; ipdb.set_trace()<Esc>_ +nnoremap <buffer> <leader>gdO Oimport ipdb; ipdb.set_trace()<Esc>_ |