From 900cd0f84896ffa6d9c5d31d0f590b4694705504 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Thu, 22 Feb 2024 17:38:12 -0600 Subject: [PATCH] feat(nvim): add run key for zsh filetypes --- dots/.config/nvim/after/ftplugin/zsh.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dots/.config/nvim/after/ftplugin/zsh.lua b/dots/.config/nvim/after/ftplugin/zsh.lua index 3bc5df49..4d812a5f 100644 --- a/dots/.config/nvim/after/ftplugin/zsh.lua +++ b/dots/.config/nvim/after/ftplugin/zsh.lua @@ -1,3 +1,9 @@ vim.opt_local.expandtab = false -vim.opt_local.expandtab = false -vim.opt_local.tabstop = 4 + +vim.keymap.set("n", "fr", function() + vim.cmd.write() + require("toggleterm").exec("zsh " .. vim.api.nvim_buf_get_name(0)) +end, { + buffer = true, + desc = "ZSH: Save and Run Current Buffer", +})