diff --git a/nvim/.config/nvim/lua/vxclutch/remap.lua b/nvim/.config/nvim/lua/vxclutch/remap.lua index 4a3b315..3cc5474 100644 --- a/nvim/.config/nvim/lua/vxclutch/remap.lua +++ b/nvim/.config/nvim/lua/vxclutch/remap.lua @@ -1,26 +1,26 @@ local function map(mode, lhs, rhs, opts) - local options = { noremap = true, silent = true } - if opts then - options = vim.tbl_extend("force", options, opts) - end - vim.keymap.set(mode, lhs, rhs, options) + local options = { noremap = true, silent = true } + if opts then + options = vim.tbl_extend("force", options, opts) + end + vim.keymap.set(mode, lhs, rhs, options) end --- remove search highlight -- +-- Remove search highlight -- map("n", "", ":nohlsearch") --- move lines -- +-- Move lines -- map("v", "J", ":m '>+1gv=gv") map("v", "K", ":m '>-2gv=gv") --- scrolling -- +-- Scrolling -- map("n", "", "zz") map("n", "", "zz") --- file navigation -- +-- Tile navigation -- map("n", "-", ":Oil") --- terminal -- +-- Terminal -- map("t", "", "") -- Exec @@ -36,3 +36,15 @@ map("n", "", "") map("n", "", "") map("n", "", "") map("n", "", "") + +-- Shell +function Shell() + vim.ui.input({ prompt = "Shell: " }, function(input) + if input then + local sanitized_input = vim.fn.shellescape(input) + vim.cmd("!" .. sanitized_input) + end + end) +end + +vim.api.nvim_create_user_command("Shell", Shell, {})