mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Make sure polyglot_disable does not skip native vim files, fixes #591
This commit is contained in:
@@ -13,6 +13,10 @@ if exists("did_load_polyglot")
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Line continuation is used here, remove 'C' from 'cpoptions'
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
let did_load_polyglot = 1
|
let did_load_polyglot = 1
|
||||||
|
|
||||||
" It can happen vim filetype.vim loads first, then we need a reset
|
" It can happen vim filetype.vim loads first, then we need a reset
|
||||||
@@ -23,10 +27,6 @@ endif
|
|||||||
" Prevent filetype.vim of vim from loading again
|
" Prevent filetype.vim of vim from loading again
|
||||||
let did_load_filetypes = 1
|
let did_load_filetypes = 1
|
||||||
|
|
||||||
" Line continuation is used here, remove 'C' from 'cpoptions'
|
|
||||||
let s:cpo_save = &cpo
|
|
||||||
set cpo&vim
|
|
||||||
|
|
||||||
" Be consistent across different systems
|
" Be consistent across different systems
|
||||||
set nofileignorecase
|
set nofileignorecase
|
||||||
|
|
||||||
@@ -117,12 +117,12 @@ func! s:StarSetf(ft)
|
|||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Load user-defined filetype.vim
|
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
runtime! filetype.vim
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
augroup filetypedetect
|
" Load user-defined filetype.vim and oter plugins ftdetect first
|
||||||
|
" This is to use polyglot-defined ftdetect always as fallback to user settings
|
||||||
|
runtime! filetype.vim
|
||||||
|
runtime! ftdetect/*.vim
|
||||||
|
|
||||||
" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
|
" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
|
||||||
|
|
||||||
@@ -3421,15 +3421,18 @@ au BufNewFile,BufRead *.txt
|
|||||||
\| setf text
|
\| setf text
|
||||||
\| endif
|
\| endif
|
||||||
|
|
||||||
" Use the filetype detect plugins. They may overrule any of the previously
|
|
||||||
" detected filetypes.
|
|
||||||
runtime! ftdetect/*.vim
|
|
||||||
|
|
||||||
" NOTE: The above command could have ended the filetypedetect autocmd group
|
" NOTE: The above command could have ended the filetypedetect autocmd group
|
||||||
" and started another one. Let's make sure it has ended to get to a consistent
|
" and started another one. Let's make sure it has ended to get to a consistent
|
||||||
" state.
|
" state.
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
" Use the filetype detect plugins. They may overrule any of the previously
|
||||||
|
" detected filetypes.
|
||||||
|
if exists("did_load_filetypes") && exists("g:polyglot_disabled")
|
||||||
|
unlet did_load_filetypes
|
||||||
|
runtime! $VIMRUNTIME/filetype.vim
|
||||||
|
endif
|
||||||
|
|
||||||
" Restore 'cpoptions'
|
" Restore 'cpoptions'
|
||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
if !exists("did_load_polyglot")
|
if !exists("did_load_polyglot")
|
||||||
runtime! ftdetect/polyglot.vim
|
filetype plugin indent on
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user