Hi, I'm looking for a way to make vim to update positions of tags in a file while the file is edited. When I have a file like:
line1 see line3 line2 line3 line4 ... and a tags file generated with symbols for line[1-4]. Each tag pointing to the line it is located at. When I press Ctrl-] on line 1 when on the text "line3". It positions me correctly to the line 3. The problem is that when I edit the file and add a line between line 1 and line 2. Let's say I get a file like this: line1 see line3 line1.5 line2 line3 line4 Now when I press Ctrl-] on line 1 on text "line3", it positions me to the 3. line (the line with text line2 and not the one with text line3). What I would like vim to do is to update its tag information after "line1.5" is added. So tags line[2-3] would have their line number incremented and tag navigation works even after simple line additions. If the tags file was not updated externally, vim would save its updated version. If it was updated externally vim would just reload it (as it does now). Similarly for deletions of lines and other editing operations. Now, I know I could regenerate tags file all the time (e.g. after buffer write), but it is not comfortable: * I'm not writing the buffer all the time, * Generating tags file for my language of choice and for bigger projects takes a long time (this is the biggest problem). If vim could update tag location information as lines are being added/ deleted and store it off at the end (if tags file was not updated externally) then it would work almost perfectly. Of course a small change of the edited source file can change e.g. a scope which can hide/expose symbols, so this simple tag location update would be in error. But I think for most of the changes this would mostly work well enough, the user can still regenerate tags file as often is it is wished, and these simple updates would be language independent. So the question is: Can this be done witch current wim 7.2 (maybe some script exists for it)? If not, can it be added as a feature request for new vim versions? Thanks, Peter. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
