aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-10-17 00:10:52 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-10-17 01:51:21 +0200
commit3bcee71cc8ef782fc89de7d72cb784cfb6d984d3 (patch)
tree189ec9cf3292f113a637b33a45278118dfc1434d /runtime
parent014bd59957beb3f94cfb014a7acde3d2544bdfd9 (diff)
downloadrneovim-3bcee71cc8ef782fc89de7d72cb784cfb6d984d3.tar.gz
rneovim-3bcee71cc8ef782fc89de7d72cb784cfb6d984d3.tar.bz2
rneovim-3bcee71cc8ef782fc89de7d72cb784cfb6d984d3.zip
:checkhealth : validate $VIM
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/health/nvim.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/autoload/health/nvim.vim b/runtime/autoload/health/nvim.vim
index 6c6a5e8543..7f6e943dc9 100644
--- a/runtime/autoload/health/nvim.vim
+++ b/runtime/autoload/health/nvim.vim
@@ -4,12 +4,19 @@ function! s:check_config() abort
let ok = v:true
call health#report_start('Configuration')
+ " If $VIM is empty we don't care. Else make sure it is valid.
+ if !empty($VIM) && !filereadable($VIM.'/runtime/doc/nvim.txt')
+ let ok = v:false
+ call health#report_error("$VIM is invalid: ".$VIM)
+ endif
+
if exists('$NVIM_TUI_ENABLE_CURSOR_SHAPE')
let ok = v:false
call health#report_warn("$NVIM_TUI_ENABLE_CURSOR_SHAPE is ignored in Nvim 0.2+",
\ [ "Use the 'guicursor' option to configure cursor shape. :help 'guicursor'",
\ 'https://github.com/neovim/neovim/wiki/Following-HEAD#20170402' ])
endif
+
if &paste
let ok = v:false
call health#report_error("'paste' is enabled. This option is only for pasting text.\nIt should not be set in your config.",