diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-19 02:25:59 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-19 02:25:59 +0200 |
commit | c3e825027ddabecf18370df61c1da4018f017b7b (patch) | |
tree | 8d60a5b049a927d6aedb938e25612aa4e7ba14aa /ftdetect | |
parent | 3618414fad6ac488e89895810d3a3da3c3c1c6fd (diff) | |
download | vim-polyglot-c3e825027ddabecf18370df61c1da4018f017b7b.tar.gz vim-polyglot-c3e825027ddabecf18370df61c1da4018f017b7b.zip |
Allow vim-polyglot to load in non-compatible mode
Diffstat (limited to 'ftdetect')
-rw-r--r-- | ftdetect/polyglot.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 99fb9413..5bb1bc76 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -10,6 +10,10 @@ endif let did_load_polyglot = 1 +" Switch to compatible mode for the time being +let s:cpo_save = &cpo +set cpo&vim + " It can happen vim filetype.vim loads first, then we need a reset if exists("did_load_filetypes") au! filetypedetect @@ -2625,6 +2629,7 @@ au BufEnter * if &ft == "" && expand("<afile>:e") == "" | augroup END + if !has_key(s:disabled_packages, 'autoindent') " Code below re-implements sleuth for vim-polyglot let g:loaded_sleuth = 1 @@ -3430,3 +3435,7 @@ if exists("did_load_filetypes") && exists("g:polyglot_disabled") unlet did_load_filetypes runtime! extras/filetype.vim endif + +" Restore 'cpoptions' +let &cpo = s:cpo_save +unlet s:cpo_save |