summaryrefslogtreecommitdiffstats
path: root/ftdetect/polyglot.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-10-17 21:23:12 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-10-17 21:23:12 +0200
commit1fc249bafdc7937b97a62107302925e8f7062b3f (patch)
tree30dfc499a360ff0353f892103aa87d5ebc3e4904 /ftdetect/polyglot.vim
parent518d733369fb6f2e4652e9649a78546ce6493079 (diff)
downloadvim-polyglot-1fc249bafdc7937b97a62107302925e8f7062b3f.tar.gz
vim-polyglot-1fc249bafdc7937b97a62107302925e8f7062b3f.zip
Set nocompatible mode instead of checking it
Diffstat (limited to 'ftdetect/polyglot.vim')
-rw-r--r--ftdetect/polyglot.vim16
1 files changed, 3 insertions, 13 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index 7473464d..72fed623 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -3,22 +3,16 @@
" Maintainer: Adam Stankiewicz <sheerun@sher.pl>
" URL: https://github.com/sheerun/vim-polyglot
-" We are not supporting non-compatible mode
-if &compatible
- finish
-endif
-
" Listen very carefully, I will say this only once
if exists("did_load_polyglot")
finish
endif
-" Line continuation is used here, remove 'C' from 'cpoptions'
-let s:cpo_save = &cpo
-set cpo&vim
-
let did_load_polyglot = 1
+" We are not supporting non-compatible mode
+set nocompatible
+
" It can happen vim filetype.vim loads first, then we need a reset
if exists("did_load_filetypes")
au! filetypedetect
@@ -3433,7 +3427,3 @@ 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