Add s:setf helper, fixes #399

This commit is contained in:
Adam Stankiewicz 2019-06-08 13:14:56 +02:00
parent 0217fb50fe
commit 17ecfbdabc
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,9 @@
function! s:setf(filetype) abort
if &filetype !=# a:filetype
let &filetype = a:filetype
endif
endfunction
" Enable jsx syntax by default
if !exists('g:jsx_ext_required')
let g:jsx_ext_required = 0

View File

@ -1,3 +1,9 @@
function! s:setf(filetype) abort
if &filetype !=# a:filetype
let &filetype = a:filetype
endif
endfunction
" Enable jsx syntax by default
if !exists('g:jsx_ext_required')
let g:jsx_ext_required = 0