My favorite tool (and one that I use many times a day) is godef (via the vim-go plugin) http://godoc.org/code.google.com/p/rog-go/exp/cmd/godef https://github.com/fatih/vim-go
Other examples of tools include Tern for JavaScript: http://ternjs.net https://github.com/marijnh/tern_for_vim and Jedi for Python: https://github.com/davidhalter/jedi https://github.com/davidhalter/jedi-vim You could also imagine the authors of Pfff (a multi-language analysis tool written by Facebook) to add support for something like this (so far as I can tell they currently expose a ctags/etags generator but not a more precise go-to-definition). https://github.com/facebook/pfff On Sat, Apr 18, 2015 at 6:00 AM, Bram Moolenaar <[email protected]> wrote: > > Carl Jackson wrote: > > > I'm curious if there's any interest in accepting the tagfunc patch (or > something similar in spirit) into vim: > > https://groups.google.com/d/msg/vim_dev/jWXPP2II0YA/lYw3j74snnwJ > > > > My use-case is to make better use of modern static analysis tools: > > many programming languages have very high quality tools that know > > exactly where any given source symbol was defined, without having to > > resort to precomputed ctags-like textual indexes. Unfortunately, these > > tools are very difficult to integrate into vim, and most vim plugins > > which add support for these tools cut corners and don't replicate any > > of ctags' stack-like or tselect behavior, which makes for a pretty > > terrible UX. > > > > I don't have strong opinions on the best way to tackle this problem, > > but tagfunc seems like a very convenient solution (an alternative > > might be a mechanism to programmatically push and pop entries from the > > tag stack). Especially given that this patch has been floating around > > for a while now, I'd be eager to see it included in vim proper. > > Can you give examples of those tools? I wonder what would be the best > way to communicate with them. Adding a Vim script function likely has > the disadvantage that it can only work synchronously, thus block the > user while analyzing the code. Some plugins use Python to communicate > asynchronously, supporting that might be a better direction. > > -- > Friends? I have lots of friends! In fact, I have all episodes ever made. > > /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net > \\\ > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ > \\\ > \\\ an exciting new programming language -- http://www.Zimbu.org > /// > \\\ help me help AIDS victims -- http://ICCF-Holland.org > /// > -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
