feat(nvim): add run key for 'python' files

This commit is contained in:
Price Hiller 2024-03-10 18:26:36 -05:00
parent 4bc507d1e9
commit 3c4c30969c
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -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",
})