add mapleader, and eregex for decent regex in search nd replace

This commit is contained in:
sadanslargehole 2024-05-17 19:07:18 -04:00
parent 555767ac22
commit f82b2495f6
No known key found for this signature in database
GPG key ID: B2E2F4A5161A7800
3 changed files with 16 additions and 5 deletions

View file

@ -1,4 +1,6 @@
local tb = require("telescope.builtin")
vim.g.mapleader = " "
-- find Files
vim.keymap.set("n", "<C-f>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", "<C-.>", vim.lsp.buf.code_action, {})
-- copy and paste
vim.keymap.set("v", "<A-c>", "\"+y", {})
vim.keymap.set("n", "<A-c>", "\"+yy", {})
vim.keymap.set("v", "<A-v>", "\"+p", {})
vim.keymap.set("n", "<A-v>", "\"+p", {})
vim.keymap.set("v", "<A-c>", '"+y', {})
vim.keymap.set("n", "<A-c>", '"+yy', {})
vim.keymap.set("v", "<A-v>", '"+p', {})
vim.keymap.set("n", "<A-v>", '"+p', {})
-- lsp rename
vim.keymap.set("n", "<F2>", vim.lsp.buf.rename, {})
vim.keymap.set({"n", "v"}, ";", ":")
vim.keymap.set({ "n", "v" }, ";", ":")
vim.keymap.set("n", "<leader>/", ":call eregex#toggle()<CR>", {
noremap = true,
})

View file

@ -2,6 +2,9 @@ local plugins = {
{
"lambdalisue/suda.vim",
},
{
"sadan4/eregex.vim"
},
{
"windwp/nvim-ts-autotag"
},

View file

@ -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" }, {