diff --git a/lua/keymap.lua b/lua/keymap.lua index 710ce3b..baac403 100644 --- a/lua/keymap.lua +++ b/lua/keymap.lua @@ -1,6 +1,9 @@ local tb = require("telescope.builtin") vim.g.mapleader = " " + +vim.keymap.set("n", "", ""); +vim.keymap.set("n", "", ""); -- find Files vim.keymap.set("n", "f", tb.find_files, {}) -- find Text @@ -42,7 +45,6 @@ vim.keymap.set("i", "", function() end, {}) -- format and vplit remaps vim.keymap.set({ "n", "i" }, "", vim.cmd.Format, {}) -vim.keymap.set({ "i", "n" }, "", vim.cmd.vsplit, {}) -- vscode fold and unfold vim.keymap.set("n", "", "zc", {}) vim.keymap.set("n", "", "zo", {}) @@ -96,10 +98,55 @@ vim.keymap.set("i", "", ':echoe "Use j"i') vim.keymap.set({"n", "v", "i"}, "", "", { noremap = true }) + vim.cmd.aunmenu([[PopUp.How-to\ disable\ mouse]]) vim.cmd.aunmenu([[PopUp.Paste]]) vim.cmd.aunmenu([[PopUp.Select\ All]]) vim.cmd.aunmenu([[PopUp.Inspect]]) +-- make #, closer to the cursor, fw search and * bw +vim.keymap.set("n", "#", "*", { + noremap = true +}) +vim.keymap.set("n", "*", "#", { + noremap = true +}) + +-- moving bewteen splits +vim.keymap.set("n", "", "l"); +vim.keymap.set("n", "", "k"); +vim.keymap.set("n", "", "j"); +vim.keymap.set("n", "", "h"); +-- close +vim.keymap.set("n", "", "c"); +-- quit +vim.keymap.set("n", "", "q") +-- resizing +-- 3 lower width, 4 increace width +vim.keymap.set("n", "", "<"); +vim.keymap.set("n", "", ">"); +-- e lower height, r increase height +vim.keymap.set("n", "", ">"); +vim.keymap.set("n", "", ">"); + +-- movement: +-- o move left, p move right +vim.keymap.set("n", "", "L"); +vim.keymap.set("n", "", "H"); + +-- 9 move down, 0 move up +vim.keymap.set("n", "", "K"); +vim.keymap.set("n", "", "J"); +-- ./init.lua +vim.keymap.set({ "i", "n" }, "", vim.cmd.vsplit, {}) +vim.keymap.set({ "i", "n" }, "", vim.cmd.split, {}) +-- go to file under cursor +vim.keymap.set({"n"}, "", "F"); +-- only +-- makes more sense to use O for moving splits +vim.keymap.set({ "n" }, "", vim.cmd.only, {}) +-- open Definition in split view +vim.keymap.set({ "n" }, "", "}", {}) + -- vim.api.nvim_create_autocmd("BufAdd", { -- callback = function(e) -- vim.keymap.set({"n", "i", "v"}, "", "", {