Re: tags with abc::efg?
Beware, add the colon to 'iskeyword' works but it may mess up one thing: the switch-case statement and the label: switch (foo) { case bar: } here the "bar" will be recognized as "bar:", and of course the "bar:" does not exist. It will be inconvinient to search "bar" using the "*" or the "", pretty annoying. Unless we could add "::" to 'iskeyword' instead of the single colon, it seems to be difficult to cope with this. Any hints? -- Sincerely, Pan, Shi Zhu. ext: 2606 Henry <[EMAIL PROTECTED]> 写于 2006-10-28 08:59:38: > > > AJ, > > Thank you very much. This is what I was looking for. > > Sincerely, > Henry > > --- "A.J.Mechelynck" <[EMAIL PROTECTED]> > wrote: > > > Henry wrote: > > > Hi, > > > > > > I have a bunch TCL procs defined with :: in the > > name. > > > ie: abc::efg. > > > > > > I created a tags file, inside the tag file, it has > > > abc::efg > > > > > > When I try to jump to this proc "abc::efg" in vim, > > > using CTRL-], it can't find it. If cursor is under > > > abc, then I get an message "E426: tag not found: > > abc" > > > If the cursor is under efg, then I get a message > > > "E426: tag not found: efg". So it seems that vim > > can't > > > trace the tag properly. It should use the entire > > > string "abc::efg" to search for the tag. > > > > > > Anybody has a solution?? > > > > > > Thanks. > > > > I think it has something to do with your 'iskeyword' > > option. Try using > > > >:setlocal isk+=: > > > > (adding the colon to the 'iskeyword' option) on the > > files which have that kind > > of tags. Or, if it is for any TCL files, you might > > want to add the above > > command (without the initial colon) in a file named > > (on Unix-like systems) > > ~/.vim/after/ftplugin/tcl.vim or (on other systems) > > ~/vimfiles/after/ftplugin/tcl.vim (in both cases in > > "vim" notation). > > > > Create the file and any directories in its path if > > they don't exist yet. You > > might for instance paste the following lines as a > > *.vim script and source it > > (this is untested): > > > >if has("unix") > > !mkdir -p ~/.vim/after/ftplugin > > let s:vimdir = ".vim" > >else > > silent! !mkdir $HOME/vimfiles > > silent! !mkdir $HOME/vimfiles/after > > silent! !mkdir $HOME/vimfiles/after/ftplugin > > let s:vimdir = "vimfiles" > >endif > >exe 'new ~/' . s:vimdir . '/after/ftplugin/tcl.vim' > >$put ='setlocal isk+=:' > >wq > > > > See > >:help 'iskeyword' > >:help after-directory > >etc. > > > > > > > > Best regards, > > Tony. > > > > > > > > > > Low, Low, Low Rates! Check out Yahoo! Messenger's cheap PC-to-Phone > call rates > (http://voice.yahoo.com) >
Re: tags with abc::efg?
AJ, Thank you very much. This is what I was looking for. Sincerely, Henry --- "A.J.Mechelynck" <[EMAIL PROTECTED]> wrote: > Henry wrote: > > Hi, > > > > I have a bunch TCL procs defined with :: in the > name. > > ie: abc::efg. > > > > I created a tags file, inside the tag file, it has > > abc::efg > > > > When I try to jump to this proc "abc::efg" in vim, > > using CTRL-], it can't find it. If cursor is under > > abc, then I get an message "E426: tag not found: > abc" > > If the cursor is under efg, then I get a message > > "E426: tag not found: efg". So it seems that vim > can't > > trace the tag properly. It should use the entire > > string "abc::efg" to search for the tag. > > > > Anybody has a solution?? > > > > Thanks. > > I think it has something to do with your 'iskeyword' > option. Try using > > :setlocal isk+=: > > (adding the colon to the 'iskeyword' option) on the > files which have that kind > of tags. Or, if it is for any TCL files, you might > want to add the above > command (without the initial colon) in a file named > (on Unix-like systems) > ~/.vim/after/ftplugin/tcl.vim or (on other systems) > ~/vimfiles/after/ftplugin/tcl.vim (in both cases in > "vim" notation). > > Create the file and any directories in its path if > they don't exist yet. You > might for instance paste the following lines as a > *.vim script and source it > (this is untested): > > if has("unix") > !mkdir -p ~/.vim/after/ftplugin > let s:vimdir = ".vim" > else > silent! !mkdir $HOME/vimfiles > silent! !mkdir $HOME/vimfiles/after > silent! !mkdir $HOME/vimfiles/after/ftplugin > let s:vimdir = "vimfiles" > endif > exe 'new ~/' . s:vimdir . '/after/ftplugin/tcl.vim' > $put ='setlocal isk+=:' > wq > > See > :help 'iskeyword' > :help after-directory > etc. > > > > Best regards, > Tony. > Low, Low, Low Rates! Check out Yahoo! Messenger's cheap PC-to-Phone call rates (http://voice.yahoo.com)
Re: tags with abc::efg?
Henry wrote: Hi, I have a bunch TCL procs defined with :: in the name. ie: abc::efg. I created a tags file, inside the tag file, it has abc::efg When I try to jump to this proc "abc::efg" in vim, using CTRL-], it can't find it. If cursor is under abc, then I get an message "E426: tag not found: abc" If the cursor is under efg, then I get a message "E426: tag not found: efg". So it seems that vim can't trace the tag properly. It should use the entire string "abc::efg" to search for the tag. Anybody has a solution?? Thanks. I think it has something to do with your 'iskeyword' option. Try using :setlocal isk+=: (adding the colon to the 'iskeyword' option) on the files which have that kind of tags. Or, if it is for any TCL files, you might want to add the above command (without the initial colon) in a file named (on Unix-like systems) ~/.vim/after/ftplugin/tcl.vim or (on other systems) ~/vimfiles/after/ftplugin/tcl.vim (in both cases in "vim" notation). Create the file and any directories in its path if they don't exist yet. You might for instance paste the following lines as a *.vim script and source it (this is untested): if has("unix") !mkdir -p ~/.vim/after/ftplugin let s:vimdir = ".vim" else silent! !mkdir $HOME/vimfiles silent! !mkdir $HOME/vimfiles/after silent! !mkdir $HOME/vimfiles/after/ftplugin let s:vimdir = "vimfiles" endif exe 'new ~/' . s:vimdir . '/after/ftplugin/tcl.vim' $put ='setlocal isk+=:' wq See :help 'iskeyword' :help after-directory etc. Best regards, Tony.