From: Andy Wokula Date: Sat, 21 Oct 2017 15:47:30 +0000 (+0200) Subject: added \{...\} X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/30cfa267832b84f0cd9615edd3007c06a3b00cfa?ds=sidebyside;hp=--cc added \{...\} --- 30cfa267832b84f0cd9615edd3007c06a3b00cfa diff --git a/autoload/explainpat.vim b/autoload/explainpat.vim index 6c65567..5662732 100644 --- a/autoload/explainpat.vim +++ b/autoload/explainpat.vim @@ -1,10 +1,9 @@ " File: explainpat.vim " Created: 2011 Nov 02 -" Last Change: 2013 Dec 30 -" Rev Days: 12 +" Last Change: 2017 Oct 20 +" Version: 0.7 " Author: Andy Wokula " License: Vim License, see :h license -" Version: 0.7 " Implements :ExplainPattern [pattern] @@ -167,7 +166,7 @@ let s:doc['\?'] = "(multi) zero or one of the preceding atom" " let s:doc['\{-'] = "(multi) N to M, non-greedy" func! s:DocBraceMulti(bull, hulit, item) "{{{ - let rest = a:bull.Bite('^-\=\d*\%(,\d*\)\=}') + let rest = a:bull.Bite('^-\=\d*\%(,\d*\)\=\\\=}') if rest != "" if rest == '-}' call a:hulit.Print(a:item. rest, "non-greedy version of `*'") diff --git a/doc/explainpat.txt b/doc/explainpat.txt index 86cab16..afe0fc9 100644 --- a/doc/explainpat.txt +++ b/doc/explainpat.txt @@ -1,6 +1,6 @@ *explainpat.txt* Give detailed help on a regexp pattern. - For Vim version 7.0. Last change: 2013 Jun 29 + For Vim version 7.0. Last change: 2017 Oct 20 By Andy Wokula *explainpat* *explainpat.vim* @@ -53,6 +53,9 @@ Ideas: ============================================================================== History: +v0.7 ++ BF `\{3,4\}` not accepted, only `\{3,4}` + v0.6 + BF `[]` is a literal string (not a collection) diff --git a/plugin/explainpat.vim b/plugin/explainpat.vim index 18dd574..731f9a4 100644 --- a/plugin/explainpat.vim +++ b/plugin/explainpat.vim @@ -28,7 +28,7 @@ if v:version < 700 finish endif -com! -nargs=* ExplainPattern call explainpat#ExplainPattern() +com! -nargs=? ExplainPattern call explainpat#ExplainPattern() " Modeline: {{{1 " vim:ts=8:fdm=marker: