Hari Krishna Dara wrote: > I asked a couple of questions below, but I solved the last one > ('ignorecse') by implementing a filter() myself, so it is not an issue. > The other question is on why "{}" works on win32 GVIM (7.0 version > compiled by you) is not important, though a confirmation that yes, that > is supposed to work will be great. It can then also be documented to > avoid confurion in the future (as this works on posix platforms also, it > might be important for someone to know what characters are special and > need escaped in some situations).
I don't know why {} works in Win32 Gvim. I don't really have time to figure it out. Perhaps someone else can dig into the code. > I have another question related to this. According to the help on > |file-pattern|, there is no significance for "^" and "$" characters, but > I have been using them with bufnr() to be able to do an exact match on > filenames. I have a suspicion that they were suggested by you when I had > a question on how to restrict bufnr() to do this exact match (probably > about 5 years ago). The function is defined like this: > > function! s:FindBufferForName(fileName) > let fileName = genutils#Escape(a:fileName, '[?,{') > let _isf = &isfname > try > set isfname-=\ > set isfname-=[ > let i = bufnr('^' . fileName . '$') > finally > let &isfname = _isf > endtry > return i > endfunction > > It has been working great, but since I am using what seem like > undocumented features, I just wanted your perusal on my usage, as well > as getting it documented such that this will not be broken in a future > change. This is documented: A full match is preferred over a partial match. Internally the ^ and $ are added to find a match, only if this fails they are left out. Thus if you _only_ want to find a full match you should add the ^ and $. -- ARTHUR: Be quiet! DENNIS: --but by a two-thirds majority in the case of more-- ARTHUR: Be quiet! I order you to be quiet! WOMAN: Order, eh -- who does he think he is? ARTHUR: I am your king! The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///