aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Hiar <cody@hiar.ca>2022-08-16 12:19:36 -0600
committerCody Hiar <cody@hiar.ca>2022-08-16 12:19:36 -0600
commit35049468512751042618e14f5b12f68e3395ec18 (patch)
treeac5ba631da302bc1d2ca8440ad0f66fcaa5032f5
parentaf8606e7ceb49e234b6e80b9f095d762794a43e6 (diff)
Add commmand for generating variable print statements in python
-rw-r--r--init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index cc0491e..e886dba 100644
--- a/init.lua
+++ b/init.lua
@@ -119,7 +119,9 @@ vim.api.nvim_set_keymap('n', '<leader>ld', 'j^f$lC', { noremap = true })
-- After searching pull entry to current position
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>ep', 'ofrom pudb import set_trace; set_trace()<esc>', { noremap = true })
+vim.api.nvim_set_keymap('n', '<leader>epu', 'ofrom pudb import set_trace; set_trace()<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
vim.api.nvim_set_keymap('n', '<c-w>t', "<cmd>tabnew<cr>", { noremap = true })
vim.api.nvim_set_keymap('n', '<c-w><c-f>', '<c-w>f<c-w>T', { noremap = true })