From 716813ee2ddaafda31299f28e59c6eed95b33278 Mon Sep 17 00:00:00 2001 From: Sergiy Borodych Date: Thu, 11 Jun 2015 10:23:20 +0300 Subject: [PATCH] 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 --- plugin/autoformat.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugin/autoformat.vim b/plugin/autoformat.vim index 4d5b703..daf5ed1 100644 --- a/plugin/autoformat.vim +++ b/plugin/autoformat.vim @@ -111,6 +111,13 @@ function! s:TryFormatter() " Detect verbosity 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 let winview=winsaveview()