feat(nvim): add run key for 'python' files
This commit is contained in:
parent
4bc507d1e9
commit
3c4c30969c
@ -39,3 +39,11 @@ vim.api.nvim_create_autocmd("InsertCharPre", {
|
|||||||
vim.api.nvim_input("<Esc>m'" .. row + 1 .. "gg" .. col + 1 .. "|if<Esc>`'la")
|
vim.api.nvim_input("<Esc>m'" .. row + 1 .. "gg" .. col + 1 .. "|if<Esc>`'la")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>fr", function()
|
||||||
|
vim.cmd.write()
|
||||||
|
require("toggleterm").exec("python " .. vim.api.nvim_buf_get_name(0))
|
||||||
|
end, {
|
||||||
|
buffer = true,
|
||||||
|
desc = "Python: Save and Run Current Buffer",
|
||||||
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user