Ben Fritz wrote: > > On Apr 8, 1:57 pm, Charles Campbell <[email protected]> > wrote: > >> Yang Zhang wrote: >> >>> Hi, can I have the tag stack always displayed in a window, instead of >>> repeatedly bringing it up with :tags? >>> >> I'm sure it can be done. As some hints on how to do this; >> > > Sure, I didn't say it would be impossible...just involved. > > >> * autocmd and CursorMove -- every time the cursor moves have vim call >> a function which will update a window >> > > Alternatively, you could use CursorHold, which will only update when > you STOP moving the cursor for a given period of time (specifically, > the current value of 'updatetime'). This will mean that the tag stack > is not always correct, but also that you don't fire your script every > time you move the cursor, which could get distracting. > > >> * that function for updating: use >> redir => tagsout >> tags >> redir END >> for example, to get the current output of tags >> * then your function should clear some window you've dedicated for the >> purpose and dump the latest tagsout to it >> > > Something Chip did not mention is that your special window should > probably have the 'buftype' option set to "nofile". 'nomodifiable' may > also be a good idea. To give this special buffer a name, use the :file > command. > Sorry, Ben -- I didn't realize that you'd replied already. Your reply is probably on my "download & remove-from-server" machine instead of on the current "download & leave-on-server" machine. As it was, I didn't see any replies to his Q.
Additional hints: * use the lazyredraw option while refreshing the tags window. * use silent call YourFunction() -- so as to prevent the redir from echo'ing to the screen. * setlocal bt=nofile nomod ro (most of which was lifted from Ben's comments above) Regards, Chip Campbell --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
