Skip to content

Commit

Permalink
Make sure vim-misc is installed, politely complain if it isn't
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Aug 19, 2013
1 parent a04b3ab commit 1e1a116
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions addon-info.json
@@ -0,0 +1 @@
{"vim_script_nr": 3123, "dependencies": {"vim-misc": {}}, "homepage": "http://peterodding.com/code/vim/shell", "name": "vim-shell"}
4 changes: 2 additions & 2 deletions autoload/xolox/shell.vim
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion doc/shell.txt
Expand Up @@ -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>.

===============================================================================
Expand Down
16 changes: 15 additions & 1 deletion plugin/shell.vim
@@ -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.
Expand All @@ -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')
Expand Down

0 comments on commit 1e1a116

Please sign in to comment.