Skip to content

Commit 22c8ade

Browse files
brammooldouglaskayama
authored andcommitted
Add the logiPat plugin to the distribution.
1 parent 1e70321 commit 22c8ade

8 files changed

Lines changed: 593 additions & 35 deletions

File tree

runtime/doc/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ DOCS = \
7575
pattern.txt \
7676
pi_getscript.txt \
7777
pi_gzip.txt \
78+
pi_logipat.txt \
7879
pi_netrw.txt \
7980
pi_paren.txt \
8081
pi_spec.txt \
@@ -207,6 +208,7 @@ HTMLS = \
207208
pattern.html \
208209
pi_getscript.html \
209210
pi_gzip.html \
211+
pi_logipat.html \
210212
pi_netrw.html \
211213
pi_paren.html \
212214
pi_spec.html \

runtime/doc/options.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 7.4. Last change: 2015 May 04
1+
*options.txt* For Vim version 7.4. Last change: 2015 Jun 19
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/pi_logipat.txt

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
*pi_logipat.txt* Logical Patterns Mar 13, 2013
2+
3+
Author: Charles E. Campbell <[email protected]>
4+
Copyright: (c) 2004-2013 by Charles E. Campbell *logipat-copyright*
5+
The VIM LICENSE applies to LogiPat.vim and LogiPat.txt
6+
(see |copyright|) except use "LogiPat" instead of "Vim"
7+
No warranty, express or implied. Use At-Your-Own-Risk.
8+
9+
==============================================================================
10+
1. Contents *logipat* *logipat-contents*
11+
12+
1. Contents.................: |logipat-contents|
13+
2. LogiPat Manual...........: |logipat-manual|
14+
3. LogiPat Examples.........: |logipat-examples|
15+
4. Caveat...................: |logipat-caveat|
16+
5. LogiPat History..........: |logipat-history|
17+
18+
==============================================================================
19+
2. LogiPat Manual *logipat-manual* *logipat-man*
20+
21+
22+
*logipat-arg* *logipat-input* *logipat-pattern* *logipat-operators*
23+
Boolean logic patterns are composed of
24+
25+
operators ! = not
26+
| = logical-or
27+
& = logical-and
28+
grouping ( ... )
29+
patterns "pattern"
30+
31+
:LogiPat {boolean-logic pattern} *:LogiPat*
32+
:LogiPat is a command which takes a boolean-logic
33+
argument (|logipat-arg|).
34+
35+
:LP {boolean-logic pattern} *:LP*
36+
:LP is a shorthand command version of :LogiPat
37+
(|:LogiPat|).
38+
39+
:ELP {boolean-logic pattern} *:ELP*
40+
No search is done, but the conversion from the
41+
boolean logic pattern to the regular expression
42+
is performed and echoed onto the display.
43+
44+
:LogiPatFlags {search flags} *LogiPat-flags*
45+
:LogiPatFlags {search flags}
46+
LogiPat uses the |search()| command. The flags
47+
passed to that call to search() may be specified
48+
by the :LogiPatFlags command.
49+
50+
:LPF {search flags} *:LPF*
51+
:LPF is a shorthand version of :LogiPatFlags.
52+
53+
:let pat=LogiPat({boolean-logic pattern}) *LogiPat()*
54+
If one calls LogiPat() directly, no search
55+
is done, but the transformation from the boolean
56+
logic pattern into a regular expression pattern
57+
is performed and returned.
58+
59+
To get a " inside a pattern, as opposed to having it delimit
60+
the pattern, double it.
61+
62+
==============================================================================
63+
3. LogiPat Examples *logipat-examples*
64+
65+
LogiPat takes Boolean logic arguments and produces a regular
66+
expression which implements the choices. A series of examples
67+
follows:
68+
>
69+
:LogiPat "abc"
70+
< will search for lines containing the string :abc:
71+
>
72+
:LogiPat "ab""cd"
73+
< will search for lines containing the string :ab"c:
74+
>
75+
:LogiPat !"abc"
76+
< will search for lines which don't contain the string :abc:
77+
>
78+
:LogiPat "abc"|"def"
79+
< will search for lines which contain either the string
80+
:abc: or the string :def:
81+
>
82+
:LogiPat !("abc"|"def")
83+
< will search for lines which don't contain either
84+
of the strings :abc: or :def:
85+
>
86+
:LogiPat "abc"&"def"
87+
< will search for lines which contain both of the strings
88+
:abc: and :def:
89+
>
90+
:let pat= LogiPat('!"abc"')
91+
< will return the regular expression which will match
92+
all lines not containing :abc: . The double quotes
93+
are needed to pass normal patterns to LogiPat, and
94+
differentiate such patterns from boolean logic
95+
operators.
96+
97+
98+
==============================================================================
99+
4. Caveat *logipat-caveat*
100+
101+
The "not" operator may be fragile; ie. it may not always play well
102+
with the & (logical-and) and | (logical-or) operators. Please try out
103+
your patterns, possibly with :set hls, to insure that what is matching
104+
is what you want.
105+
106+
==============================================================================
107+
3. LogiPat History *logipat-history*
108+
109+
v3 Sep 25, 2006 * LP_Or() fixed; it now encapsulates its output
110+
in \%(...\) parentheses
111+
Dec 12, 2011 * |:ELP| added
112+
* "" is mapped to a single " and left inside patterns
113+
v2 May 31, 2005 * LPF and LogiPatFlags commands weren't working
114+
v1 May 23, 2005 * initial release
115+
116+
==============================================================================
117+
vim:tw=78:ts=8:ft=help

runtime/doc/tags

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,14 +1854,18 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
18541854
:CompilerSet usr_41.txt /*:CompilerSet*
18551855
:DiffOrig diff.txt /*:DiffOrig*
18561856
:DoMatchParen pi_paren.txt /*:DoMatchParen*
1857+
:ELP pi_logipat.txt /*:ELP*
18571858
:Explore pi_netrw.txt /*:Explore*
18581859
:GLVS pi_getscript.txt /*:GLVS*
18591860
:GetLatestVimScripts_dat pi_getscript.txt /*:GetLatestVimScripts_dat*
18601861
:GnatFind ft_ada.txt /*:GnatFind*
18611862
:GnatPretty ft_ada.txt /*:GnatPretty*
18621863
:GnatTags ft_ada.txt /*:GnatTags*
18631864
:Hexplore pi_netrw.txt /*:Hexplore*
1865+
:LP pi_logipat.txt /*:LP*
1866+
:LPF pi_logipat.txt /*:LPF*
18641867
:Lexplore pi_netrw.txt /*:Lexplore*
1868+
:LogiPat pi_logipat.txt /*:LogiPat*
18651869
:Man filetype.txt /*:Man*
18661870
:MkVimball pi_vimball.txt /*:MkVimball*
18671871
:N editing.txt /*:N*
@@ -4468,6 +4472,8 @@ L motion.txt /*L*
44684472
Linux-backspace options.txt /*Linux-backspace*
44694473
List eval.txt /*List*
44704474
Lists eval.txt /*Lists*
4475+
LogiPat() pi_logipat.txt /*LogiPat()*
4476+
LogiPat-flags pi_logipat.txt /*LogiPat-flags*
44714477
Lua if_lua.txt /*Lua*
44724478
M motion.txt /*M*
44734479
MDI starting.txt /*MDI*
@@ -6789,6 +6795,7 @@ lcs-eol options.txt /*lcs-eol*
67896795
lcs-extends options.txt /*lcs-extends*
67906796
lcs-nbsp options.txt /*lcs-nbsp*
67916797
lcs-precedes options.txt /*lcs-precedes*
6798+
lcs-space options.txt /*lcs-space*
67926799
lcs-tab options.txt /*lcs-tab*
67936800
lcs-trail options.txt /*lcs-trail*
67946801
left-right-motions motion.txt /*left-right-motions*
@@ -6836,6 +6843,18 @@ location-list quickfix.txt /*location-list*
68366843
location-list-window quickfix.txt /*location-list-window*
68376844
log() eval.txt /*log()*
68386845
log10() eval.txt /*log10()*
6846+
logipat pi_logipat.txt /*logipat*
6847+
logipat-arg pi_logipat.txt /*logipat-arg*
6848+
logipat-caveat pi_logipat.txt /*logipat-caveat*
6849+
logipat-contents pi_logipat.txt /*logipat-contents*
6850+
logipat-copyright pi_logipat.txt /*logipat-copyright*
6851+
logipat-examples pi_logipat.txt /*logipat-examples*
6852+
logipat-history pi_logipat.txt /*logipat-history*
6853+
logipat-input pi_logipat.txt /*logipat-input*
6854+
logipat-man pi_logipat.txt /*logipat-man*
6855+
logipat-manual pi_logipat.txt /*logipat-manual*
6856+
logipat-operators pi_logipat.txt /*logipat-operators*
6857+
logipat-pattern pi_logipat.txt /*logipat-pattern*
68396858
long-lines version5.txt /*long-lines*
68406859
love intro.txt /*love*
68416860
lowercase change.txt /*lowercase*
@@ -7514,6 +7533,7 @@ php3.vim syntax.txt /*php3.vim*
75147533
phtml.vim syntax.txt /*phtml.vim*
75157534
pi_getscript.txt pi_getscript.txt /*pi_getscript.txt*
75167535
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
7536+
pi_logipat.txt pi_logipat.txt /*pi_logipat.txt*
75177537
pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
75187538
pi_paren.txt pi_paren.txt /*pi_paren.txt*
75197539
pi_spec.txt pi_spec.txt /*pi_spec.txt*

runtime/doc/todo.txt

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ More info Jul 24. Not clear why.
7474
Better .ico file for Windows. (Pat Suwalski, 2015 Feb 13)
7575
Waiting for response on remark from Edward Fox.
7676

77-
Patch to make getregtype() return the right size for non-linux systems.
78-
(Yasuhiro Matsumoto, 2014 Jul 8)
79-
Breaks test_eval. Inefficient, can we only compute y_width when needed?
80-
8177
Problem that a previous silent ":throw" causes a following try/catch not to
8278
work. (ZyX, 2013 Sep 28)
8379

@@ -88,43 +84,13 @@ Regression for v_b_A. (Ingo Karkat, 2015 May 18)
8884
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
8985
directory exists. (Sergio Gallelli, 2013 Dec 29)
9086

91-
Patch on issue 365.
92-
93-
Patch to add "vsplit" to 'switchbuf'. (Brook Hong, 2015 Jun 4)
94-
95-
patch to fix that "p" in Visual mode does not break line in expected place.
96-
(Yukihiro Nakadaira, 2015 May 23)
97-
98-
Patch to fix that wide characters do not work properly after exiting.
99-
(Yasuhiro Matsumoto, 2015 May 24) Better patch to come.
100-
101-
Patch to add grepfile(). (Scott Prager, 2015 May 26)
102-
103-
keymap for Russian typewriter layout. (Danwerspb, 2015 May 15)
104-
105-
Patch for man.vim. (SungHyun Nam, 2015 May 20)
106-
Doesn't work completely (Dominique Orban)
107-
108-
The entries added by matchaddpos() are returned by getmatches() but can't be
109-
set with setmatches(). (lcd47, 2014 Jun 29)
110-
Patch by Christian, 2015 Jun 16.
111-
11287
Invalid memory access in regexp.c. (Dominique Pelle, 2015 May 23)
11388

11489
Using ":windo" to set options in all windows has the side effect that it
11590
changes the window layout and the current window. Make a variant that saves
11691
and restores. Use in the matchparen plugin.
11792
Perhaps we can use ":silent window"?
11893

119-
Patch for :[count]tag" not always working. (Hirohito Higashi, 2015 May 19)
120-
121-
Include the LogiPat plugin in the distribution?
122-
123-
Patch to fix that ":cnext" jumps to the wrong column. (Hirohito Higashi, 2015
124-
May 17, second patch)
125-
126-
Pull request for jcukenwintype.vim. (Denis Proskurin, 2015 May 15)
127-
12894
Patch for appending in Visual mode with 'linebreak' set.
12995
(Christian Brabandt, 2015 Jun 1)
13096

@@ -177,6 +143,13 @@ Is this the right solution?
177143
Patch for langmap not working properly with mapping in Command-line mode.
178144
Issue 376.
179145

146+
Patch to add grepfile(). (Scott Prager, 2015 May 26)
147+
Work in progress.
148+
149+
Patch to make getregtype() return the right size for non-linux systems.
150+
(Yasuhiro Matsumoto, 2014 Jul 8)
151+
Breaks test_eval. Inefficient, can we only compute y_width when needed?
152+
180153
Value returned by virtcol() changes depending on how lines wrap. This is
181154
inconsistent with the documentation.
182155

@@ -210,6 +183,12 @@ ml_updatechunk() is slow when retrying for another encoding. (John Little,
210183
Patch to use different terminal mode settings for system(). (Hayaki Saito)
211184
Does this work for everybody?
212185

186+
Patch to fix that wide characters do not work properly after exiting.
187+
(Yasuhiro Matsumoto, 2015 May 24) Better patch to come.
188+
189+
Patch for man.vim. (SungHyun Nam, 2015 May 20)
190+
Doesn't work completely (Dominique Orban)
191+
213192
When a session file is created and there are "nofile" buffers, these are not
214193
filled. Need to trigger BufReadCmd autocommands. Also handle deleting the
215194
initial empty buffer better. (ZyX, 2015 March 8)
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
" Vim Keymap file for russian characters, layout 'jcuken', MS Windows variant
2+
" (slightly incompatible with XFree86 'ru' keymap - makes use of NUMERO SIGN)
3+
" Useful mainly with utf-8 but may work with other encodings
4+
5+
" Derived from russian-jcuken.vim by Artem Chuprina <[email protected]>
6+
" Typewriter variant of standart russian layout
7+
" Maintainer: Denis Proskurin <[email protected]>
8+
" Last Changed: 2015 May 15
9+
10+
" All characters are given literally, conversion to another encoding (e.g.,
11+
" UTF-8) should work.
12+
13+
scriptencoding utf-8
14+
15+
let b:keymap_name = "ru"
16+
17+
loadkeymap
18+
~ + CYRILLIC CAPITAL LETTER IO
19+
` | CYRILLIC SMALL LETTER IO
20+
F А CYRILLIC CAPITAL LETTER A
21+
< Б CYRILLIC CAPITAL LETTER BE
22+
D В CYRILLIC CAPITAL LETTER VE
23+
U Г CYRILLIC CAPITAL LETTER GHE
24+
L Д CYRILLIC CAPITAL LETTER DE
25+
T Е CYRILLIC CAPITAL LETTER IE
26+
: Ж CYRILLIC CAPITAL LETTER ZHE
27+
P З CYRILLIC CAPITAL LETTER ZE
28+
B И CYRILLIC CAPITAL LETTER I
29+
Q Й CYRILLIC CAPITAL LETTER SHORT I
30+
R К CYRILLIC CAPITAL LETTER KA
31+
K Л CYRILLIC CAPITAL LETTER EL
32+
V М CYRILLIC CAPITAL LETTER EM
33+
Y Н CYRILLIC CAPITAL LETTER EN
34+
J О CYRILLIC CAPITAL LETTER O
35+
G П CYRILLIC CAPITAL LETTER PE
36+
H Р CYRILLIC CAPITAL LETTER ER
37+
C С CYRILLIC CAPITAL LETTER ES
38+
N Т CYRILLIC CAPITAL LETTER TE
39+
E У CYRILLIC CAPITAL LETTER U
40+
A Ф CYRILLIC CAPITAL LETTER EF
41+
{ Х CYRILLIC CAPITAL LETTER HA
42+
W Ц CYRILLIC CAPITAL LETTER TSE
43+
X Ч CYRILLIC CAPITAL LETTER CHE
44+
I Ш CYRILLIC CAPITAL LETTER SHA
45+
O Щ CYRILLIC CAPITAL LETTER SHCHA
46+
} Ъ CYRILLIC CAPITAL LETTER HARD SIGN
47+
S Ы CYRILLIC CAPITAL LETTER YERU
48+
M Ь CYRILLIC CAPITAL LETTER SOFT SIGN
49+
\" Э CYRILLIC CAPITAL LETTER E
50+
> Ю CYRILLIC CAPITAL LETTER YU
51+
Z Я CYRILLIC CAPITAL LETTER YA
52+
f а CYRILLIC SMALL LETTER A
53+
, б CYRILLIC SMALL LETTER BE
54+
d в CYRILLIC SMALL LETTER VE
55+
u г CYRILLIC SMALL LETTER GHE
56+
l д CYRILLIC SMALL LETTER DE
57+
t е CYRILLIC SMALL LETTER IE
58+
; ж CYRILLIC SMALL LETTER ZHE
59+
p з CYRILLIC SMALL LETTER ZE
60+
b и CYRILLIC SMALL LETTER I
61+
q й CYRILLIC SMALL LETTER SHORT I
62+
r к CYRILLIC SMALL LETTER KA
63+
k л CYRILLIC SMALL LETTER EL
64+
v м CYRILLIC SMALL LETTER EM
65+
y н CYRILLIC SMALL LETTER EN
66+
j о CYRILLIC SMALL LETTER O
67+
g п CYRILLIC SMALL LETTER PE
68+
h р CYRILLIC SMALL LETTER ER
69+
c с CYRILLIC SMALL LETTER ES
70+
n т CYRILLIC SMALL LETTER TE
71+
e у CYRILLIC SMALL LETTER U
72+
a ф CYRILLIC SMALL LETTER EF
73+
[ х CYRILLIC SMALL LETTER HA
74+
w ц CYRILLIC SMALL LETTER TSE
75+
x ч CYRILLIC SMALL LETTER CHE
76+
i ш CYRILLIC SMALL LETTER SHA
77+
o щ CYRILLIC SMALL LETTER SHCHA
78+
] ъ CYRILLIC SMALL LETTER HARD SIGN
79+
s ы CYRILLIC SMALL LETTER YERU
80+
m ь CYRILLIC SMALL LETTER SOFT SIGN
81+
' э CYRILLIC SMALL LETTER E
82+
. ю CYRILLIC SMALL LETTER YU
83+
z я CYRILLIC SMALL LETTER YA
84+
@ "
85+
# № NUMERO SIGN
86+
$ ;
87+
^ :
88+
& ?
89+
/ ё
90+
? Ё
91+
1
92+
2 -
93+
3 /
94+
4 "
95+
5 :
96+
6 ,
97+
7 .
98+
8 _
99+
9 ?
100+
0 %
101+
- !
102+
= ;
103+
\\ )
104+
\| (

runtime/plugin/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Look in the file for hints on how it can be disabled without deleting it.
55

66
getscriptPlugin.vim get latest version of Vim scripts
77
gzip.vim edit compressed files
8+
logiPat.vim logical operators on patterns
89
matchparen.vim highlight paren matching the one under the cursor
910
netrwPlugin.vim edit files over a network and browse (remote) directories
1011
rrhelper.vim used for --remote-wait editing

0 commit comments

Comments
 (0)