Skip to content

Commit

Permalink
Make editing same file in multiple vim instances seamless
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerun committed Oct 24, 2020
1 parent f52f6b9 commit 739102e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ftdetect/polyglot.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ if exists("did_load_polyglot")
finish
endif


let did_load_polyglot = 1

" Switch to compatible mode for the time being
Expand Down Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions plugin/polyglot.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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^=!
Expand Down

0 comments on commit 739102e

Please sign in to comment.