From 8db95a1880c46c80e356745d7ceb19f652912826 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 5 May 2022 15:26:43 +0200 Subject: [PATCH] use something else for shada --- lua/my_autocommands.lua | 3 ++- lua/my_keymappings.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/my_autocommands.lua b/lua/my_autocommands.lua index f058acb..9f048e4 100644 --- a/lua/my_autocommands.lua +++ b/lua/my_autocommands.lua @@ -46,7 +46,8 @@ api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { }) -- Read and write shada file -api.nvim_create_autocmd({ 'FocusGained', 'FocusLost' }, { command = [[rshada | wshada]] }) +api.nvim_create_autocmd({ 'FocusLost' }, { command = [[wshada]] }) +api.nvim_create_autocmd({ 'FocusGained' }, { command = [[rshada]] }) -- go to last loc when opening a buffer api.nvim_create_autocmd( diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index 7554670..32e5a08 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -21,7 +21,7 @@ vim.keymap.set('n', '', ':wincmd j', { noremap = true, silent = true vim.keymap.set('n', '', ':wincmd h', { noremap = true, silent = true }) vim.keymap.set('n', '', ':wincmd l', { noremap = true, silent = true }) -vim.keymap.set('n', '', ':wa') +vim.keymap.set('n', '', ':wa | wshada') -- Linewrap and jumping vim.keymap.set('n', 'k', 'gk')