From 6c7a2f30a202f485a890e780735089ce854602f6 Mon Sep 17 00:00:00 2001 From: subcrip Date: Mon, 21 Oct 2024 18:23:22 +0800 Subject: [PATCH] Update nvim/lua/config.lua Signed-off-by: subcrip --- nvim/lua/config.lua | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/nvim/lua/config.lua b/nvim/lua/config.lua index 6595e42..9255497 100644 --- a/nvim/lua/config.lua +++ b/nvim/lua/config.lua @@ -1,5 +1,9 @@ vim.cmd("set encoding=utf-8") vim.cmd("set exrc") +vim.cmd("set undofile") +vim.cmd("set undodir=~/.vim/undofiles") +vim.cmd("set undolevels=10000") +vim.cmd("set undoreload=50000") vim.cmd("filetype off") vim.cmd("set pumblend=40") vim.cmd("set winblend=40") @@ -151,12 +155,12 @@ local plugins = { { 'jdhao/better-escape.vim' -- `jk` without causing `j` to have delay }, - { - 'Pocco81/auto-save.nvim', - opts = { - enabled = true, - } - }, + -- { + -- 'Pocco81/auto-save.nvim', + -- opts = { + -- enabled = true, + -- } + -- }, { "windwp/nvim-autopairs", event = "InsertEnter", @@ -787,6 +791,8 @@ vim.keymap.set('n', 'x', require("mini.trailspace").trim, {noremap=true} vim.keymap.set('n', '', vim.notify.dismiss, {noremap=true}) vim.keymap.set({'n', 'v', 'x'}, 'Q', 'q', {noremap=true}) vim.keymap.set({'n', 'v', 'x'}, 'q', '', {noremap=true}) +vim.keymap.set('n', 'g ', [[/\v^\s+$$nohlsearch]], {noremap=true, silent=true}) +vim.keymap.set('n', 'gy', "`[v`]", {noremap=true}) vim.api.nvim_create_user_command('SearchInCurrentFile', function() vim.ui.input({ prompt = 'Grep ...'}, function(input)