commit d4bfe3f8487e469d57cd0ecb1e4d61b7a90bfb73
parent 9f051acb3542b9a0bd99c39d8763fb331d27c752
Author: bdmfegys@duck.com <bdmfegys@duck.com>
Date: Tue, 30 Apr 2024 17:05:38 -0400
options.lua, keymaps.lua: move keymap configs from options.lua to keymaps.lua
Diffstat:
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/lua/keymaps.lua b/lua/keymaps.lua
@@ -0,0 +1,9 @@
+local map = vim.keymap.set
+----- move to window
+map("n", "<C-h>", "<C-w>h", { desc = "Go to Left Window" })
+map("n", "<C-j>", "<C-w>j", { desc = "Go to Lower Window" })
+map("n", "<C-k>", "<C-w>k", { desc = "Go to Upper Window" })
+map("n", "<C-l>", "<C-w>l", { desc = "Go to Right Window" })
+
+--- clear search with escape
+--map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and Clear hlsearch" })
diff --git a/lua/options.lua b/lua/options.lua
@@ -13,13 +13,3 @@ local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
-
-local map = vim.keymap.set
------ move to window
-map("n", "<C-h>", "<C-w>h", { desc = "Go to Left Window" })
-map("n", "<C-j>", "<C-w>j", { desc = "Go to Lower Window" })
-map("n", "<C-k>", "<C-w>k", { desc = "Go to Upper Window" })
-map("n", "<C-l>", "<C-w>l", { desc = "Go to Right Window" })
-
---- clear search with escape
---map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and Clear hlsearch" })