From 70e01e3354dd3753a24eb2a3a24a5046ba4a8797 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Fri, 7 Jan 2022 13:18:33 +0000 Subject: [PATCH] Adds autocommand for updating the shared file This allows neovim instances to share registers, marks, command history and some other bits. See :h shada Augroup stolen from here: https://vi.stackexchange.com/a/24564 --- nvim/.config/nvim/plugin/settings.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nvim/.config/nvim/plugin/settings.vim b/nvim/.config/nvim/plugin/settings.vim index 105d58d0..c231053c 100644 --- a/nvim/.config/nvim/plugin/settings.vim +++ b/nvim/.config/nvim/plugin/settings.vim @@ -64,3 +64,10 @@ augroup colorcols autocmd! autocmd FileType,VimEnter,BufEnter * call mine#functions#colorcols() augroup end + +" share data between nvim instances (registers etc) +augroup SHADA + autocmd! + autocmd CursorHold,TextYankPost,FocusGained,FocusLost * + \ if exists(':rshada') | rshada | wshada | endif +augroup END