diff options
author | Cody Hiar <cody@hiar.ca> | 2022-12-02 19:58:41 -0700 |
---|---|---|
committer | Cody Hiar <cody@hiar.ca> | 2022-12-02 19:58:41 -0700 |
commit | ef72069de3febd41305f41f398ec07effc344854 (patch) | |
tree | d74261d813436e1cb884bb023767e6c953262b12 | |
parent | 1a19154482a1e8fb99eac67bc41bbcbe6d72d9b3 (diff) |
Add shortcut for embedding ipython
-rw-r--r-- | init.lua | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -120,6 +120,8 @@ vim.api.nvim_set_keymap('n', '<leader>ld', 'j^f$lC', { noremap = true }) vim.api.nvim_set_keymap('n', '<leader>ly', 'vapy<C-o>p{{jvEy}jvEpl', { noremap = true }) -- Shorcut to insert pudb statements for python vim.api.nvim_set_keymap('n', '<leader>epu', 'ofrom pudb import set_trace; set_trace()<esc>', { noremap = true }) +-- Shorcut to embed ipython +vim.api.nvim_set_keymap('n', '<leader>epi', 'ofrom IPython import embed<cr>from traitlets.config import get_config<cr>c = get_config()<cr>c.InteractiveShellEmbed.colors = "Linux"<cr>embed(config=c)<esc>', { noremap = true }) -- yank current word and make print statement on next line vim.api.nvim_set_keymap('n', '<leader>epp', 'yiwoprint("<esc>pa: ", <esc>pa)<esc>V=', { noremap = true }) -- Easy new tab creation |