Bill McCarthy wrote:

Chip,
I tried again with just AsNeeded and taglist in my
vimfiles\plugin and vimfiles\doc - otherwise an empty
vimfiles tree - and fairly minimalist _vimrc and _gvimrc
(see below my sig).

I opened an edit session on a small project with 25 .c or .h
files:

   gvim *.c *.h

Typing ':Tlist' brings up the Tlist window.  Now save the
Tlist session with:

   :TlistSessionSave TLS

Close down and type 'gvim' by itself and then type
':TListSessionLoad TLS'

I get:

***warning*** AsNeeded unable to find <€ýP23_Tlist_Session_Load> in the 
(runtimepath)/AsNeeded directory
1 buffer wiped out
Taglist: Error - Unable to open file TLS

Can you or anyone else duplicate this behavior?
I was able to duplicate it... (good directions, by the way)

1) with taglist.vim in .vim/AsNeeded, after having done :MkAsNeeded, which
creates .vim/AsNeeded/ANtags and .vim/plugin/ANcmds.vim, and then doing:

gvim *.c
:Tlist
:TlistSessionSave TLS
:q!
gvim
:TlistSessionLoad TLS

yielded the message:

***success*** AsNeeded found <TlistSessionLoad> in <~/.vim/AsNeeded/taglist.vim>; now loaded

My .vimrc only had a setting for Tlist_Ctags_Cmd (which tells taglist where
the ctags I want it to use is)

2) Next, I included the following in my initialization:

let Tlist_Exit_OnlyWindow = 1
let Tlist_File_Fold_Auto_Close = 1
let Tlist_GainFocus_On_ToggleOpen = 1
let Tlist_Use_SingleClick = 1
let Tlist_Show_Menu = 0
let Tlist_Compact_Format = 1

and then I did:

gvim *.c
:Tlist
:TlistSessionSave TLS
:qa!
gvim
:TlistSessionLoad TLS

yielded the message:

***success*** AsNeeded found <TlistSessionLoad> in <~/.vim/AsNeeded/taglist.vim>; now loaded

3) Next, I moved taglist.vim from .vim/AsNeeded to .vim/plugin
gvim
:MkAsNeeded
:q
to regenerate the .vim/AsNeeded/ANtags and .vim/plugin/ANcmds.vim files (and still using the
Tlist settings from step 2).

gvim
:TlistSessionLoad TLS

This caused the warning message that Bill sees:

***warning*** AsNeeded unable to find <[EMAIL PROTECTED]> in the (runtimepath)/AsNeeded directory

Now, the function being called is defined as s:Tlist_Window_Toggle(), which means that its a script
local function. I see a note in taglist.vim itself:

"To speed up the loading of Vim, the taglist plugin uses autoload mechanism to load the taglist functions."

Taglist is doing a little trick: it does a "quick load" to set up commands which depend upon FuncUndefined events to cause the rest of the file to be sourced. Seems that Taglist's autocmds do get executed, though, so AsNeeded isn't causing that sort of a problem, just a superfluous warning message (after all, AsNeeded
really wasn't able to load the function).

Anyway, I've modified AsNeeded to defer to taglist for Tlist_ and Taglist_ functions in v14b. Its available
from my website at:

http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs as "AsNeeded".

The solution I personally prefer is just to put taglist.vim in the AsNeeded/ directory as I did in my first try above,
though.

Regards,
Chip Campbell



  • Re: AsNeeded? Charles E Campbell Jr

Reply via email to