On 01-Apr-2013 David Fishburn <[email protected]> wrote: > On Mon, Apr 1, 2013 at 11:16 AM, Lech Lorens <[email protected]> wrote: > > > People using ctags while working on code which is edited by multiple > > people in various editors will be familiar with this situation: the code > > ends up with a mix of line endings – some of them are Unix-style, some > > of them are DOS-style. > > > > The problem is that if Vim reads such a file with ff=unix, it will fail > > to find tags if the tag pattern searched should match on a DOS-style > > line. The attached patch handles the problem in a naïve but surprisingly > > effective way: if a pattern search fails, Vim will try putting "\r\*" > > before the last "$" in the pattern and will retry the search. > > > > I haven't looked at the patch, but what is the behaviour when > fileformats=unix,dos,mac > > Does it exhibit the same behaviour? > I would think this patch should alter it's behaviour based on the values in > this setting. > > My $0.02 > > David
No, the patch only works for DOS vs Unix file format. It could be extended to handle a mix of Mac and DOS line endings but – like Bram mentioned in the other thread – it comes at a performance cost. I personally have never come across a single file in Mac format which I would have to edit in Vim. So from my point of view it is not worth the cost. I agree that for the sake of symmetry it should be handled, but I would be happy to hear a request from someone who would find it useful just to be sure I'm not working on a solution looking for a problem. On the other hand, after what Bram said, I am not sure it is worth handling the DOS-Unix case. I am certainly going to use this modification but is it going to be useful to others? Thanks for your comment! Cheers, Lech -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
