diff --git a/docs/drafts/keybindgs.md b/docs/drafts/keybindgs.md index 22cae4f3..331ccba4 100644 --- a/docs/drafts/keybindgs.md +++ b/docs/drafts/keybindgs.md @@ -3,17 +3,21 @@ ## Python ```lua -lvim.autocommands.custom_groups = { +lvim.autocommands = { { "Filetype", - "python", - "nnoremap r lua require('core.terminal')._exec_toggle('python " .. vim.fn.expand "%" .. ";read')", + { + pattern = "python", + command = "nnoremap r lua require('toggleterm.terminal').Terminal:new {cmd='python ' .. vim.fn.expand('%') .. ';read', hidden =false}:toggle()", + }, }, { "Filetype", - "python", - "nnoremap t lua require('toggleterm.terminal').Terminal:new {cmd='python -m unittest;read', hidden =false}:toggle()", - }, + { + pattern = "python", + command = "nnoremap t lua require('toggleterm.terminal').Terminal:new {cmd='python -m unittest;read', hidden =false}:toggle()", + }, + } } lvim.builtin.which_key.mappings["r"] = "Run" lvim.builtin.which_key.mappings["t"] = "Test"