From 99fe636f09c842bb3ed491f1b8b36c3ab7ecac9c Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Wed, 7 Jan 2015 11:02:18 -0800 Subject: [PATCH] Snippet for python prompt toolkit embed https://github.com/jonathanslenders/python-prompt-toolkit ```python from prompt_toolkit.contrib.repl import embed embed(globals(), locals(), vi_mode=False, history_filename=None) ``` --- snippets/python.snippets | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/snippets/python.snippets b/snippets/python.snippets index 860b572..77d74e4 100644 --- a/snippets/python.snippets +++ b/snippets/python.snippets @@ -135,6 +135,10 @@ snippet iem # ipython debugger (pdbbb) snippet pdbbb import pdbpp; pdbpp.set_trace() +# python_prompt_toolkit +snippet ppt + from prompt_toolkit.contrib.repl import embed + embed(globals(), locals(), vi_mode=${1:default=False}, history_filename=${2:default=None}) # python console debugger (pudb) snippet pudb import pudb; pudb.set_trace()