From f4431f6d75baa71aa23318ea50bea3848f946ab1 Mon Sep 17 00:00:00 2001 From: talha Date: Tue, 23 Apr 2024 00:43:02 +0500 Subject: Migrated to lazy.nvim, added neomake, a few remaps --- lua/talha/remap.lua | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'lua/talha/remap.lua') diff --git a/lua/talha/remap.lua b/lua/talha/remap.lua index 882d651..cfd6624 100644 --- a/lua/talha/remap.lua +++ b/lua/talha/remap.lua @@ -1,5 +1,3 @@ -vim.g.mapleader = " " - -- open project view with netrw vim.keymap.set("n", "pv", vim.cmd.Ex) @@ -24,10 +22,16 @@ vim.keymap.set("n", "N", "Nzzzv") vim.keymap.set("x", "p", "\"_dP") --- copying to system clipboard +---- system clipboard +-- copying vim.keymap.set("n", "y", [["+y]]) vim.keymap.set("v", "y", [["+y]]) vim.keymap.set("n", "Y", [["+Y]]) +-- pasting +-- @note: for posting in insert mode use: + +vim.keymap.set("n", "p", [["+p]]) +vim.keymap.set("n", "P", [["+P]]) +vim.keymap.set("v", "p", [["+p]]) -- deleting without polluting vim clipboard vim.keymap.set({"n", "x"}, "x", [["_x]]) @@ -36,6 +40,13 @@ vim.keymap.set({"n", "x"}, "X", [["_d]]) -- global substitute the word cursor is on in current file vim.keymap.set("n", "s", [[:%s/\<\>//gI]]) --- remapping quickfix list navigation -vim.keymap.set("n", "l", vim.cmd.cnext) -vim.keymap.set("n", "h", vim.cmd.cprev) +---- remapping quickfix list navigation +-- go to next error +vim.keymap.set("n", "", function() SafeCListNav(1) end) +-- go to prev error +vim.keymap.set("n", "", function() SafeCListNav(-1) end) +-- open error list when there are errors +vim.keymap.set("n", "", vim.cmd.cw) + +-- building +-- vim.keymap.set("n", "", vim.cmd.Neomake{bang=true}) -- cgit v1.2.3