xolox / vim-easytags

Automated tag file generation and syntax highlighting of tags in Vim
http://peterodding.com/code/vim/easytags/
1.01k stars 109 forks source link

how to load easytag only when ctags are installed? #167

Open pinggit opened 6 years ago

pinggit commented 6 years ago

the message is annoying:

easytags.vim 3.11: Plug-in not loaded because Exuberant Ctags isn't installed! On Ubuntu & Debian you can install Exuberant Ctags by installing the package named `exuberant-ctags': sudo apt-get install exuberant-ctags

is there a knob to disable easytag auto load when ctag is not installed or recognized?

vendion commented 5 years ago

I'm getting a similar error

vim-misc 1.17.6: Failed to read temporary file (/tmp/nvimquqKFB/14) with standard output of external command: Vim(return):E484: Can't open file /tmp/nvimquqKFB/14! (external command: /usr/bin/ctags --version)vim-misc 1.17.6: Failed to read temporary file (/tmp/nvimquqKFB/15) with standard error of external command: Vim(return):E484: Can't open file /tmp/nvimquqKFB/15! (external command: /usr/bin/ctags --version)easytags.vim 3.11: Plug-in not loaded because Exuberant Ctags isn't installed! Please download & install Exuberant Ctags from http://ctags.sf.net

Now I do have Exuberant Ctags installed, just for some reason it isn't being detected

[~]─> which ctags
/usr/bin/ctags
[~]─> ctags --version
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Jun  3 2018, 17:34:56
  Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex, +internal-sort

Vim Version and build info (if it helps)

[~]─> vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Aug 13 2018 14:59:01)
Included patches: 1-279
Compiled by Arch Linux
Huge version without GUI.  Features included (+) or not (-):
+acl               +extra_search      +mouse_netterm     +tag_old_static
+arabic            +farsi             +mouse_sgr         -tag_any_white
+autocmd           +file_in_path      -mouse_sysmouse    +tcl/dyn
+autochdir         +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    +gettext           +netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          -toolbar
+cindent           +insert_expand     +path_extra        +user_commands
-clientserver      +job               +perl/dyn          +vartabs
-clipboard         +jumplist          +persistent_undo   +vertsplit
+cmdline_compl     +keymap            +postscript        +virtualedit
+cmdline_hist      +lambda            +printer           +visual
+cmdline_info      +langmap           +profile           +visualextra
+comments          +libcall           +python/dyn        +viminfo
+conceal           +linebreak         +python3/dyn       +vreplace
+cryptv            +lispindent        +quickfix          +wildignore
+cscope            +listcmds          +reltime           +wildmenu
+cursorbind        +localmap          +rightleft         +windows
+cursorshape       +lua/dyn           +ruby/dyn          +writebackup
+dialog_con        +menu              +scrollbind        -X11
+diff              +mksession         +signs             -xfontset
+digraphs          +modify_fname      +smartindent       -xim
-dnd               +mouse             +startuptime       -xpm
-ebcdic            -mouseshape        +statusline        -xsmp
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_clipboard
+eval              +mouse_gpm         +syntax            -xterm_save
+ex_extra          -mouse_jsbterm     +tag_binary        
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -D_FORTIFY_SOURCE=2  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -L. -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.28/core_perl/CORE  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -L/usr/local/lib -Wl,--as-needed -o vim        -lm -ltinfo -lelf -lnsl    -lacl -lattr -lgpm -ldl   -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.28/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/perl5/5.28/core_perl/CORE -lperl -lpthread -ldl -lm -lcrypt -lutil -lc   -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm 
ukos-git commented 5 years ago

@pinggit I agree that it is annoying for example I reuse my vimrc on different machines. Some of which are non-developing machines or minimal installations.

The message originates here:

https://github.com/xolox/vim-easytags/blob/72a8753b5d0a951e547c51b13633f680a95b5483/plugin/easytags.vim#L72-L80

the main purpose was #58 and https://github.com/xolox/vim-easytags/commit/fe6ba732f9122246496d6d66229d0d2967a59c8e but making the warn level xolox#misc#msg#warn less verbose would be good. Maybe a way shorter message at an info level would be good here.

@xolox any suggestions?