Make editing same file in multiple vim instances seamless

This commit is contained in:
Adam Stankiewicz
2020-10-24 17:32:39 +02:00
parent f52f6b9519
commit 739102e06d
2 changed files with 15 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ if exists("did_load_polyglot")
finish
endif
let did_load_polyglot = 1
" Switch to compatible mode for the time being
@@ -3496,6 +3497,15 @@ if !has_key(s:disabled_packages, 'sensible')
" Reload unchanged files automatically.
set autoread
" Disable swap, it doesn't play well with autoread
set noswapfile
" Auto reload if file was changed somewhere else (for autoread)
augroup polyglot-sensible
au!
au CursorHold * checktime
augroup END
" Enable highlighted case-insensitive incremential search.
set incsearch

View File

@@ -62,6 +62,11 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible') == -
set tabpagemax=50
endif
" Reduce updatetime from 4000 to 300 to avoid issues with coc.nvim
if &updatetime == 4000
set updatetime=300
endif
" Always save upper case variables to viminfo file.
if !empty(&viminfo)
set viminfo^=!