python - On keystroke insert line of code in (mac)vim, for pdb -
i'm looking way insert line of code keystroke leaderp in macvim
i want insert following line of code:
import pdb; pdb.set_trace()
probably not unheard of line of code in python land
this might not best vimscript every wat want! :-) place in .vimrc , can call leader p.
map <leader>p :call insertline()<cr> function! insertline() let trace = expand("import pdb; pdb.set_trace()") execute "normal o".trace endfunction
Comments
Post a Comment