On Thu, Nov 18, 2010 at 10:43 AM, ZyX <[email protected]> wrote: > Reply to message «Re: Small indent/perl.vim patch concerning bad match > patterns», > sent 15:44:46 18 November 2010, Thursday > by James Vega: > >> Since when is people not following documented behavior a reason to >> change the tool? I'd be more understanding if Vim didn't explicitly >> outline the escape sequences it does allow inside a collection. > Here are the reasons: > 1. People assume that `\[' is `[', not `\\[', there are already lots of > scripts > that do need fixing and treating `\[' as `\\[' is non-obvious.
That depends on your background. grep, sed, vi, etc. all exhibit the same behavior as Vim. > 2. Other most popular regex engines treat `[\[]' as `\[', not as `(\\|\[)'. That really has no bearing on Vim since Vim doesn't use those other engines. The other engines chose to deviate from POSIX whereas Vim chose to follow vi (and therefore POSIX). The POSIX behavior predates the engines you're referring to. > 3. Parenthesis matching has `\['-`\]' and `['-`]' pairs, not `['-`\]'. What does that have to do with anything? These aren't parenthesis. Characters inside a collection are individual. -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]> -- 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
