Hi Bram,
The current version of ftplugin/vim.vim does not allow to jump to tags in
autoload functions (e.g. netrw#Explore, causing "E426: tag not found: netrw"),
because the '#' character is no keyword character. Similarly, the 'w' motion
and
'*' command to not recognize the entire autoload function name as one entity.
Therefore, I think it makes sense to :setl isk+=# for the 'vim' filetype.
Attached patch (against the latest runtime sources) accomplishes that.
(Note that only recent versions of ctags (mine is Ctags 5.7 from Sep 4 2007 for
Windows) can recognize and add tags for Vim autoload functions.)
-- best regards, ingo
--
-- Ingo Karkat -- /^-- /^-- /^-- /^-- /^-- /^-- http://ingo-karkat.de/ --
--
If the Universe is constantly expanding, why can't I ever find a parking space?
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
*** ftplugin/vim.vim.orig 2009-01-21 20:47:45.000000000 +0100
--- ftplugin/vim.vim 2009-01-21 20:50:38.000000000 +0100
***************
*** 14,26 ****
let cpo_save = &cpo
set cpo-=C
! let b:undo_ftplugin = "setl fo< com< tw< commentstring<"
\ . "| unlet! b:match_ignorecase b:match_words b:match_skip"
" Set 'formatoptions' to break comment lines but not other lines,
" and insert the comment leader when hitting <CR> or using "o".
setlocal fo-=t fo+=croql
" Set 'comments' to format dashed lists in comments
setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"
--- 14,30 ----
let cpo_save = &cpo
set cpo-=C
! let b:undo_ftplugin = "setl fo< isk< com< tw< commentstring<"
\ . "| unlet! b:match_ignorecase b:match_words b:match_skip"
" Set 'formatoptions' to break comment lines but not other lines,
" and insert the comment leader when hitting <CR> or using "o".
setlocal fo-=t fo+=croql
+ " To allow tag lookup via CTRL-] for autoload functions, '#' (the autoload
+ " file-function separator) must be a keyword character.
+ setlocal isk+=#
+
" Set 'comments' to format dashed lists in comments
setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"