Permalink
Browse files

Make sure vim-misc is installed, politely complain if it isn't

  • Loading branch information...
1 parent a04b3ab commit 1e1a1161760870d8b675a0a26aa5a8c2a6e2a44a @xolox committed Aug 19, 2013
Showing with 19 additions and 4 deletions.
  1. +1 −0 addon-info.json
  2. +2 −2 autoload/xolox/shell.vim
  3. +1 −1 doc/shell.txt
  4. +15 −1 plugin/shell.vim
View
@@ -0,0 +1 @@
+{"vim_script_nr": 3123, "dependencies": {"vim-misc": {}}, "homepage": "http://peterodding.com/code/vim/shell", "name": "vim-shell"}
View
@@ -1,9 +1,9 @@
" Vim auto-load script
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: June , 2013
+" Last Change: August 19, 2013
" URL: http://peterodding.com/code/vim/shell/
-let g:xolox#shell#version = '0.13'
+let g:xolox#shell#version = '0.13.1'
if !exists('s:fullscreen_enabled')
let s:enoimpl = "%s() hasn't been implemented on your platform! %s"
View
@@ -294,7 +294,7 @@ If you like the plug-in please vote for it on Vim Online [15].
*shell-license*
License ~
-This software is licensed under the MIT license [16]. © 2013 Peter Odding
+This software is licensed under the MIT license [16]. Š 2013 Peter Odding
<peter@peterodding.com>.
===============================================================================
View
@@ -1,6 +1,6 @@
" Vim plug-in
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: June 12, 2013
+" Last Change: August 19, 2013
" URL: http://peterodding.com/code/vim/shell/
" Support for automatic update using the GLVS plug-in.
@@ -11,6 +11,20 @@ if &cp || exists('g:loaded_shell')
finish
endif
+" Make sure vim-misc is installed. {{{1
+
+try
+ " The point of this code is to do something completely innocent while making
+ " sure the vim-misc plug-in is installed. We specifically don't use Vim's
+ " exists() function because it doesn't load auto-load scripts that haven't
+ " already been loaded yet (last tested on Vim 7.3).
+ call type(g:xolox#misc#version)
+catch
+ echomsg "Warning: The vim-shell plug-in requires the vim-misc plug-in which seems not to be installed! For more information please review the installation instructions in the readme (also available on the homepage and on GitHub). The vim-shell plug-in will now be disabled."
+ let g:loaded_shell = 1
+ finish
+endtry
+
" Configuration defaults. {{{1
if !exists('g:shell_fullscreen_always_on_top')

0 comments on commit 1e1a116

Please sign in to comment.