diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-04-10 01:31:25 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-04-10 01:31:25 +0200 |
commit | 939a1abe935a539f2d4c90a56cb0682cbaf3bbb0 (patch) | |
tree | 1c61c06f7844c15d473095f16a168b0ec5f6fb66 /runtime/plugin/logiPat.vim | |
parent | a4d13de8363abf4c12fe99a52b4e49e763de92fe (diff) |
Updated runtime files.
Diffstat (limited to 'runtime/plugin/logiPat.vim')
-rw-r--r-- | runtime/plugin/logiPat.vim | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/runtime/plugin/logiPat.vim b/runtime/plugin/logiPat.vim index a75d0ee7bb..47fabe954d 100644 --- a/runtime/plugin/logiPat.vim +++ b/runtime/plugin/logiPat.vim @@ -1,7 +1,7 @@ -" LogiPat: +" LogiPat: Boolean logical pattern matcher " Author: Charles E. Campbell -" Date: Mar 13, 2013 -" Version: 3 +" Date: Apr 04, 2016 +" Version: 4 " Purpose: to do Boolean-logic based regular expression pattern matching " Copyright: Copyright (C) 1999-2011 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, @@ -36,21 +36,22 @@ " --------------------------------------------------------------------- " Load Once: {{{1 -if &cp || exists("loaded_logipat") +if &cp || exists("loaded_logiPat") finish endif -let g:loaded_LogiPat = "v3" +let g:loaded_logiPat = "v4" let s:keepcpo = &cpo set cpo&vim "DechoRemOn " --------------------------------------------------------------------- " Public Interface: {{{1 -com! -nargs=* LogiPat call LogiPat(<q-args>,1) -silent! com -nargs=* LP call LogiPat(<q-args>,1) -com! -nargs=+ ELP echomsg LogiPat(<q-args>) -com! -nargs=+ LogiPatFlags let s:LogiPatFlags="<args>" -silent! com -nargs=+ LPF let s:LogiPatFlags="<args>" +com! -nargs=* LogiPat call LogiPat(<q-args>,1) +sil! com -nargs=* LP call LogiPat(<q-args>,1) +sil! com -nargs=* LPR call LogiPat(<q-args>,1,"r") +com! -nargs=+ LPE echomsg LogiPat(<q-args>) +com! -nargs=+ LogiPatFlags let s:LogiPatFlags="<args>" +sil! com -nargs=+ LPF let s:LogiPatFlags="<args>" " ===================================================================== " Functions: {{{1 @@ -66,6 +67,9 @@ fun! LogiPat(pat,...) else let dosearch= 0 endif + if a:0 >= 3 + let s:LogiPatFlags= a:3 + endif let s:npatstack = 0 let s:nopstack = 0 @@ -126,7 +130,7 @@ fun! LogiPat(pat,...) " perform the indicated search if dosearch - if exists("s:LogiPatFlags") + if exists("s:LogiPatFlags") && s:LogiPatFlags != "" " call Decho("search(result<".result."> LogiPatFlags<".s:LogiPatFlags.">)") call search(result,s:LogiPatFlags) else |