From 30cfa267832b84f0cd9615edd3007c06a3b00cfa Mon Sep 17 00:00:00 2001 From: Andy Wokula Date: Sat, 21 Oct 2017 17:47:30 +0200 Subject: [PATCH] added \{...\} --- autoload/explainpat.vim | 7 +++---- doc/explainpat.txt | 5 ++++- plugin/explainpat.vim | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) 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: -- 2.39.2