Skip to content

Commit 739102e

Browse files
committedOct 24, 2020
Make editing same file in multiple vim instances seamless
1 parent f52f6b9 commit 739102e

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
 

‎ftdetect/polyglot.vim

+10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ if exists("did_load_polyglot")
88
finish
99
endif
1010

11+
1112
let did_load_polyglot = 1
1213

1314
" Switch to compatible mode for the time being
@@ -3496,6 +3497,15 @@ if !has_key(s:disabled_packages, 'sensible')
34963497
" Reload unchanged files automatically.
34973498
set autoread
34983499

3500+
" Disable swap, it doesn't play well with autoread
3501+
set noswapfile
3502+
3503+
" Auto reload if file was changed somewhere else (for autoread)
3504+
augroup polyglot-sensible
3505+
au!
3506+
au CursorHold * checktime
3507+
augroup END
3508+
34993509
" Enable highlighted case-insensitive incremential search.
35003510
set incsearch
35013511

‎plugin/polyglot.vim

+5
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible') == -
6262
set tabpagemax=50
6363
endif
6464

65+
" Reduce updatetime from 4000 to 300 to avoid issues with coc.nvim
66+
if &updatetime == 4000
67+
set updatetime=300
68+
endif
69+
6570
" Always save upper case variables to viminfo file.
6671
if !empty(&viminfo)
6772
set viminfo^=!

0 commit comments

Comments
 (0)
Please sign in to comment.