-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E492: Not an editor command: GutentagsUpdate #297
Comments
Same issue here |
meet same issue .
Ctags version:
gtags version
I tried load Gutentags only ,it still no gutentags command can used...but when I try load in my vim 8.2 ,It can work |
Same issue here... anyone figured out what may be wrong? |
Same issue in WSL, windows 10. It has a simple way to correct it. Plz find the
It will be ok. |
Upgraded centos. Also there in |
tl;dr:
My understanding is that Vim events (autocommand-events) have changed through through versions, so my guess is that such a change possibly led to this issue with |
Sorry the delays.... so, the original repro steps include the important order of (1) opening a code file while gutentags is not installed, and (2) installing gutentags. Gutentags does its setup when you open a file, because each file could be in a different project, or in no project at all. It would be equally valid to have gutentags commands always defined, and lazily-setup the local buffer information if it's missing. We could certainly refactor the plugin to use that model instead. I frankly can't remember what I was thinking at the time -- I probably just copied the design of some popular plugin of the time... who knows. Anyway, the quick workaround is to reload the file using |
Been a while since I worked on this but here is a patch consisting of what I changed to diff --git a/plugin/gutentags.vim b/plugin/gutentags.vim
index 63be66b..d2ebffb 100644
--- a/plugin/gutentags.vim
+++ b/plugin/gutentags.vim
@@ -98,11 +98,16 @@ let g:__gutentags_vim_is_leaving = 0
augroup gutentags_detect
autocmd!
autocmd BufNewFile,BufReadPost * call gutentags#setup_gutentags()
- autocmd VimEnter * if expand('<amatch>')==''|call gutentags#setup_gutentags()|endif
+ autocmd VimEnter * call gutentags#setup_gutentags()
autocmd VimLeavePre * call gutentags#on_vim_leave_pre()
autocmd VimLeave * call gutentags#on_vim_leave()
augroup end
+" If vim-gutentags lazy-loaded:
+if v:vim_did_enter
+ call gutentags#setup_gutentags()
+endif
+
" }}}
" Toggles and Miscellaneous Commands {{{ Don't know if that's an acceptable solution, I don't think I thought through it too much. lazy-loaded in the comment above means if vim-gutentags was lazy-loaded by the plugin manager, like vim-plug or dein with e.g. IIRC I think when I just opened vim with |
Describe the bug
No commands related to this plugin are working when installed with vim-plug. I can see
:help gutentags
working. Autocompleting with ":Gu" doesn't give me any commands.:GutentagsUpdate
gives the above error. I also tried reinstalling by removingPlug ...
from vimrc,PlugClean
and put it back followed byPlugInstall
.Steps to reproduce
Plug 'ludovicchabant/vim-gutentags'
in vimrc.ctags -R *
at the root of project.PlugInstall
and see gutentags being installed.Share your setup
OS
vim
ctags
,gtags
, or whatever do you have installed?g:gutentags_cache_dir
?Yes. This is in the vimrc
Post the logs
:let g:gutentags_trace = 1
.:messages
and show the messages that Gutentags posted.tags.log
file that Gutentags' script left behind, and post its contents.Result of
:messages
:Can't find any file named
tags.log
.Additional context
Have
.ctagsignore
at the root of project:The text was updated successfully, but these errors were encountered: