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 fddbe78 commit eae3e06
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions autoload/xolox/easytags.vim
@@ -1,9 +1,9 @@
" Vim script
" Author: Peter Odding <peter@peterodding.com>
" Last Change: July 16, 2013
" Last Change: August 19, 2013
" URL: http://peterodding.com/code/vim/easytags/

let g:xolox#easytags#version = '3.4'
let g:xolox#easytags#version = '3.4.1'

" Plug-in initialization. {{{1

Expand Down
2 changes: 1 addition & 1 deletion doc/easytags.txt
Expand Up @@ -647,7 +647,7 @@ easytags. If you like this plug-in please vote for it on Vim Online [21].
*easytags-license*
License ~

This software is licensed under the MIT license [22]. © 2013 Peter Odding
This software is licensed under the MIT license [22]. Š 2013 Peter Odding
<peter@peterodding.com>.

===============================================================================
Expand Down
16 changes: 15 additions & 1 deletion 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)

Expand All @@ -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')
Expand Down

0 comments on commit eae3e06

Please sign in to comment.