diff --git a/lua/keymap.lua b/lua/keymap.lua index 14d0a91..2637ae0 100644 --- a/lua/keymap.lua +++ b/lua/keymap.lua @@ -1,4 +1,6 @@ local tb = require("telescope.builtin") + +vim.g.mapleader = " " -- find Files vim.keymap.set("n", "f", tb.find_files, {}) -- find Text @@ -50,10 +52,14 @@ vim.keymap.set("n", "gD", vim.lsp.buf.declaration, {}) vim.keymap.set("n", "gi", vim.lsp.buf.implementation, {}) vim.keymap.set("n", "", vim.lsp.buf.code_action, {}) -- copy and paste -vim.keymap.set("v", "", "\"+y", {}) -vim.keymap.set("n", "", "\"+yy", {}) -vim.keymap.set("v", "", "\"+p", {}) -vim.keymap.set("n", "", "\"+p", {}) +vim.keymap.set("v", "", '"+y', {}) +vim.keymap.set("n", "", '"+yy', {}) +vim.keymap.set("v", "", '"+p', {}) +vim.keymap.set("n", "", '"+p', {}) -- lsp rename vim.keymap.set("n", "", vim.lsp.buf.rename, {}) -vim.keymap.set({"n", "v"}, ";", ":") +vim.keymap.set({ "n", "v" }, ";", ":") + +vim.keymap.set("n", "/", ":call eregex#toggle()", { + noremap = true, +}) diff --git a/lua/plugins.lua b/lua/plugins.lua index c05746d..8dd68c6 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -2,6 +2,9 @@ local plugins = { { "lambdalisue/suda.vim", }, + { + "sadan4/eregex.vim" + }, { "windwp/nvim-ts-autotag" }, diff --git a/lua/sets.lua b/lua/sets.lua index 583fb57..f8702e2 100644 --- a/lua/sets.lua +++ b/lua/sets.lua @@ -7,6 +7,8 @@ vim.opt.shiftwidth = 4 vim.opt.smartcase = true vim.opt.ignorecase = true vim.opt.scrolloff = 6 +-- eregex.vim +vim.g.eregex_default_enable = 1 vim.api.nvim_create_autocmd({ "BufEnter" }, {