From e035fd12884a873330b59d4654c2bc854828834f Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Tue, 26 Dec 2023 17:18:36 -0600 Subject: [PATCH] feat(nvim): add keybind to run shell files with bash --- dots/.config/nvim/after/ftplugin/sh.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dots/.config/nvim/after/ftplugin/sh.lua b/dots/.config/nvim/after/ftplugin/sh.lua index 3436b9cc..dd969e74 100644 --- a/dots/.config/nvim/after/ftplugin/sh.lua +++ b/dots/.config/nvim/after/ftplugin/sh.lua @@ -1 +1,9 @@ vim.opt_local.expandtab = false + +vim.keymap.set("n", "fr", function() + vim.cmd.write() + require("toggleterm").exec("bash " .. vim.api.nvim_buf_get_name(0)) +end, { + buffer = true, + desc = "Bash: Save and Run Current Buffer" +})