aboutsummaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2013-08-19 18:42:39 +0200
committerPeter Odding <peter@peterodding.com>2013-08-19 18:42:39 +0200
commiteae3e06cbbf8a2fd8e8818c53f964e68e76f3171 (patch)
tree4792355bfb0ee10782c5b2cf58d7c5d551fd1b5d /plugin
parentfddbe787be8a82b4e6258ab6776d445fafeeba18 (diff)
downloadvim-easytags-eae3e06cbbf8a2fd8e8818c53f964e68e76f3171.tar.gz
Make sure vim-misc is installed, politely complain if it isn't
Diffstat (limited to 'plugin')
-rw-r--r--plugin/easytags.vim16
1 files changed, 15 insertions, 1 deletions
diff --git a/plugin/easytags.vim b/plugin/easytags.vim
index 07e6b67..5b22d23 100644
--- a/plugin/easytags.vim
+++ b/plugin/easytags.vim
@@ -1,6 +1,6 @@
" Vim plug-in
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: June 22, 2013
+" Last Change: August 19, 2013
" URL: http://peterodding.com/code/vim/easytags/
" Requires: Exuberant Ctags (http://ctags.sf.net)
@@ -12,6 +12,20 @@ if &cp || exists('g:loaded_easytags')
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-easytags 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-easytags plug-in will now be disabled."
+ let g:loaded_easytags = 1
+ finish
+endtry
+
" Configuration defaults and initialization. {{{1
if !exists('g:easytags_file')