diff --git a/lua/core/mapping.lua b/lua/core/mapping.lua index 06af10ec9..ca58b0743 100644 --- a/lua/core/mapping.lua +++ b/lua/core/mapping.lua @@ -12,7 +12,7 @@ local core_map = { ["n|n"] = map_cmd("nzzzv"):with_noremap():with_desc("edit: Next search result"), ["n|N"] = map_cmd("Nzzzv"):with_noremap():with_desc("edit: Prev search result"), ["n|J"] = map_cmd("mzJ`z"):with_noremap():with_desc("edit: Join next line"), - ["n|"] = map_cmd("noh"):with_noremap():with_silent():with_desc("edit: Clear search highlight"), + ["n|"] = map_cr("noh"):with_noremap():with_silent():with_desc("edit: Clear search highlight"), ["n|"] = map_cmd("h"):with_noremap():with_desc("window: Focus left"), ["n|"] = map_cmd("l"):with_noremap():with_desc("window: Focus right"), ["n|"] = map_cmd("j"):with_noremap():with_desc("window: Focus down"), @@ -25,17 +25,17 @@ local core_map = { ["n|"] = map_cr("vertical resize +5"):with_silent():with_desc("window: Resize +5 vertically"), ["n|"] = map_cr("resize -2"):with_silent():with_desc("window: Resize -2 horizontally"), ["n|"] = map_cr("resize +2"):with_silent():with_desc("window: Resize +2 horizontally"), - ["n|"] = map_cmd(":wq"):with_desc("edit: Save file and quit"), - ["n|"] = map_cmd(":q!"):with_desc("edit: Force quit"), + ["n|"] = map_cr("wq"):with_desc("edit: Save file and quit"), + ["n|"] = map_cr("q!"):with_desc("edit: Force quit"), ["n|o"] = map_cr("setlocal spell! spelllang=en_us"):with_desc("edit: Toggle spell check"), ["n|+"] = map_cmd(""):with_noremap():with_silent():with_desc("edit: Increment"), ["n|-"] = map_cmd(""):with_noremap():with_silent():with_desc("edit: Decrement"), ["n|"] = map_cmd("gg0vG$"):with_noremap():with_silent():with_desc("edit: Select all"), - ["n|tn"] = map_cmd("tabnew"):with_noremap():with_silent():with_desc("tab: Create a new tab"), - ["n|tk"] = map_cmd("tabnext"):with_noremap():with_silent():with_desc("tab: Move to next tab"), - ["n|tj"] = map_cmd("tabprevious"):with_noremap():with_silent():with_desc("tab: Move to previous tab"), - ["n|to"] = map_cmd("tabonly"):with_noremap():with_silent():with_desc("tab: Only keep current tab"), - ["n|x"] = map_cmd("!chmod +x %"):with_silent():with_desc("file: chmod +x current file"), + ["x|"] = map_cmd("gg0vG$"):with_noremap():with_silent():with_desc("edit: Select all"), + ["n|tn"] = map_cr("tabnew"):with_noremap():with_silent():with_desc("tab: Create a new tab"), + ["n|tk"] = map_cr("tabnext"):with_noremap():with_silent():with_desc("tab: Move to next tab"), + ["n|tj"] = map_cr("tabprevious"):with_noremap():with_silent():with_desc("tab: Move to previous tab"), + ["n|to"] = map_cr("tabonly"):with_noremap():with_silent():with_desc("tab: Only keep current tab"), -- Insert mode ["i|"] = map_cmd("u"):with_noremap():with_desc("edit: Delete previous block"), ["i|"] = map_cmd(""):with_noremap():with_desc("edit: Move cursor to left"), @@ -60,10 +60,3 @@ local core_map = { } bind.nvim_load_mapping(core_map) - -vim.api.nvim_set_keymap( - "n", - "s", - "%s/\\<\\>//gI", - { noremap = true, silent = true, nowait = true, desc = "edit: Start replacment mode of current word" } -)