Bas van den Berg wrote: > I'm developing a C-like language, called C2 (c2lang.org). Now the > compiler is roughly working, I am working on a vim plugin called > c2tags. The 'tags' file is generated by a compiler plugin, so is > completely correct (well it should be) and all symbol references are > indexed. > > What I'm trying to do: > + create basic plugin that call c2tags with current file, line, col > and symbol (DONE) > + have c2tags open data file and do lookup. Currently it prints the resulting > file, line and col to stdout. > - have the vim plugin read the result somehow > - have the vim plugin jump to the correct location and push it on the tags > stack > > The first 2 parts are working, but I have trouble finding a way to > return data from an external tool back into the plugin. Ctags seems to > be reading the data file itself (from what I understand from reading > the code). > > For the 2nd part, I have a way to jump to line, col, but haven't found > a good way to jump to another file and to push it to the location > stack (so that ctrl-t pops it again) > > Any hints would be very welcome,
Vim isn't well setup to get tags from anything but a tags file. Have you considered generating a tags file, so that you don't have to make any changes in Vim itself (other than updating the tags file when needed)? For Zimbu I just use ctags: https://bitbucket.org/zimbu/zimbu/src/894f28ddb1eb88e72cdfb1dd81bedf51e8718edf/Makecommon.mak?at=default&fileviewer=file-view-default#Makecommon.mak-834 -- hundred-and-one symptoms of being an internet addict: 20. When looking at a pageful of someone else's links, you notice all of them are already highlighted in purple. /// 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.
