Tuesday, March 24, 2015

Re: conversion file pattern <-> regex pattern

Le vendredi 6 mars 2015 17:47:15 UTC+1, Enno a écrit :
> To check if a file path 'path' matches &backupskip,
> the naive try
>
> path ~=# &backupskip
>
> does not work because &backupskip is a file pattern
> as used for autocmd events. Is there a function
> 'file2regex()' that converts &backupskip to a Vim regex
> pattern so that
>
> path ~=# file2regex(&backupskip)
>
> is true if and only if path matches &backupskip?

That's magical; first that there was such a function internally, your swift patch, Bram's OK and then the quick merge regarding the length of the todo list.

Thanks!

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: