summaryrefslogtreecommitdiff
path: root/lua/talha/remap.lua
diff options
context:
space:
mode:
authortalha <talha@talhaamir.xyz>2025-01-10 14:54:54 +0500
committertalha <talha@talhaamir.xyz>2025-01-10 15:01:25 +0500
commitec235190e8f3240b78f943f6fbb10408783949d0 (patch)
tree6b1a447a5c68584e54cc0c03235b77d37d61897d /lua/talha/remap.lua
parent440cc9de7021c7059523b6dafbf02f247291f160 (diff)
initializing new branch
Diffstat (limited to 'lua/talha/remap.lua')
-rw-r--r--lua/talha/remap.lua25
1 files changed, 15 insertions, 10 deletions
diff --git a/lua/talha/remap.lua b/lua/talha/remap.lua
index 0569836..f2c714b 100644
--- a/lua/talha/remap.lua
+++ b/lua/talha/remap.lua
@@ -1,3 +1,14 @@
+-- easier navigation
+vim.keymap.set("n", "<C-h>", "<C-w><C-h>")
+vim.keymap.set("n", "<C-j>", "<C-w><C-j>")
+vim.keymap.set("n", "<C-k>", "<C-w><C-k>")
+vim.keymap.set("n", "<C-l>", "<C-w><C-l>")
+
+-- tab navigation
+vim.keymap.set("n", "<C-t><C-n>", vim.cmd.tabnew)
+vim.keymap.set("n", "<C-t><C-h>", vim.cmd.tabp)
+vim.keymap.set("n", "<C-t><C-l>", vim.cmd.tabn)
+
-- open project view with netrw
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
@@ -22,11 +33,6 @@ vim.keymap.set("n", "N", "Nzzzv")
vim.keymap.set("x", "<leader>p", "\"_dP")
--- Tab navigation
-vim.keymap.set("n", "<C-t>n", vim.cmd.tabn)
--- go to prev error
-vim.keymap.set("n", "<C-t>p", vim.cmd.tabp)
-
---- system clipboard
-- copying
vim.keymap.set("n", "<leader>y", [["+y]])
@@ -51,9 +57,8 @@ vim.keymap.set("n", "<A-n>", function() SafeCListNav(1) end)
-- go to prev error
vim.keymap.set("n", "<A-p>", function() SafeCListNav(-1) end)
-- open error list when there are errors
-vim.keymap.set("n", "<A-e>", vim.cmd.cw)
+vim.keymap.set("n", "<A-w>", vim.cmd.cw)
+
+---- snippets
+vim.keymap.set("n", "<A-s>", [[:lua LoadSnippet('')<Left><Left>]])
--- building
-vim.keymap.set("n", "<F5>", function()
- vim.cmd.Neomake{bang=true};
-end)