add check if vim has no support for python
it is necessary to verify the custom formatter if no support show a notional warning message
This commit is contained in:
parent
8e72f291c7
commit
716813ee2d
@ -111,6 +111,13 @@ function! s:TryFormatter()
|
|||||||
" Detect verbosity
|
" Detect verbosity
|
||||||
let verbose = &verbose || exists("g:autoformat_verbosemode")
|
let verbose = &verbose || exists("g:autoformat_verbosemode")
|
||||||
|
|
||||||
|
if !has("python")
|
||||||
|
echohl WarningMsg |
|
||||||
|
\ echomsg "WARNING: vim has no support for python, but it is necessary to verify the custom formatter!" |
|
||||||
|
\ echohl None
|
||||||
|
return 1
|
||||||
|
endif
|
||||||
|
|
||||||
" Save window state
|
" Save window state
|
||||||
let winview=winsaveview()
|
let winview=winsaveview()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user