{ keymaps = [ { # vim.keymap.set({ "n", "v" }, "\\y", '"+y', {noremap=true, silent=true}) mode = [ "n" "v" ]; key = "\\y"; action = "\"+y"; options = { silent = true; remap = false; }; } { mode = [ "n" "v" ]; key = "bp"; action = "bprev"; options.desc = "Previous buffer"; } { mode = [ "n" "v" ]; key = "bn"; action = "bnext"; options.desc = "Next buffer"; } { mode = [ "n" "v" ]; key = "bd"; action = "bdelete"; options.desc = "Delete buffer"; } { mode = [ "n" "v" ]; key = "bD"; action = "bdelete!"; options.desc = "Delete buffer !"; } # https://www.youtube.com/watch?v=w7i4amO_zaE # keep search result in the middle of the screen { mode = [ "n" ]; key = "n"; action = "nzzzv"; } # keep search result in the middle of the screen { mode = [ "n" ]; key = "N"; action = "Nzzzv"; } # preserve previously copyed text when pasting when highlighting text # otherwise, previously copyed text will be lost and clipboard will be filled with highlighted text { mode = [ "x" ]; key = "p"; action = "\"_dP"; } ]; extraConfigLua = '' -- see ":help default-mapping" -- vim.cmd[[unmap Y]] vim.keymap.del( "n", "Y" ) ''; }