From ef72069de3febd41305f41f398ec07effc344854 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Fri, 2 Dec 2022 19:58:41 -0700 Subject: Add shortcut for embedding ipython --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index c3b6d9b..b17b046 100644 --- a/init.lua +++ b/init.lua @@ -120,6 +120,8 @@ vim.api.nvim_set_keymap('n', 'ld', 'j^f$lC', { noremap = true }) vim.api.nvim_set_keymap('n', 'ly', 'vapyp{{jvEy}jvEpl', { noremap = true }) -- Shorcut to insert pudb statements for python vim.api.nvim_set_keymap('n', 'epu', 'ofrom pudb import set_trace; set_trace()', { noremap = true }) +-- Shorcut to embed ipython +vim.api.nvim_set_keymap('n', 'epi', 'ofrom IPython import embedfrom traitlets.config import get_configc = get_config()c.InteractiveShellEmbed.colors = "Linux"embed(config=c)', { noremap = true }) -- yank current word and make print statement on next line vim.api.nvim_set_keymap('n', 'epp', 'yiwoprint("pa: ", pa)V=', { noremap = true }) -- Easy new tab creation -- cgit v1.2.3