Skip to content

Commit 9d533cd

Browse files
committed
Merge branch 'master' into unstable
2 parents 2761f0b + 500ed1a commit 9d533cd

File tree

7 files changed

+61
-5
lines changed

7 files changed

+61
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ EasyGrep is a plugin for performing search and replace operations through multip
77

88
EasyGrep provides both key mappings and commands to make search and replace easy. When using EasyGrep, searching for a word is as easy as typing <leader>vv (v v, not double-u) over the word for which you want to search. This search can also be accomplished with the :Grep command and a user-specified pattern. Performing a "replace in files" is similar; type <leader>vr or use the :Replace command. Setting options is easy, simply type <leader>vo or :GrepOptions. EasyGrep provides a great set of defaults but can also be configured to start up just how you like it; see the script for these options. Most vimgrep (and grepprg) options are supported.
99

10-
For a screencast of the script in action go here: http://downloads.veryspeedy.net/vim/EasyGrep.gif
11-
1210
## Why EasyGrep?
1311

1412
* Supports multiple Grep programs (vimgrep, grep, ack, ag, pt, git grep, csearch).
@@ -76,5 +74,7 @@ Commands:
7674
3. A user specified directory. The search location is fixed and does
7775
not change.
7876

77+
## Screencast
7978

79+
![Alt text](https://cloud.githubusercontent.com/assets/2375604/9804914/d0c39ff0-5800-11e5-8e7d-b77543bf2dcf.gif "EasyGrep demo")
8080

plugin/EasyGrep.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2857,7 +2857,7 @@ function! s:DoReplace(target, replacement, wholeword, escapeArgs)
28572857

28582858
let finished = 0
28592859
let lastFile = -1
2860-
let doAll = 0
2860+
let doAll = exists("g:EasyGrepAutomatedTest")
28612861
let i = 0
28622862
while i < numMatches && !finished
28632863
try
@@ -3138,7 +3138,7 @@ function! s:ResultListDo(command)
31383138

31393139
let finished = 0
31403140
let lastFile = -1
3141-
let doAll = 0
3141+
let doAll = exists("g:EasyGrepAutomatedTest")
31423142
let i = 0
31433143
while i < numMatches && !finished
31443144
try
@@ -3226,7 +3226,7 @@ function! s:ResultListDo(command)
32263226
endif
32273227

32283228
if doit
3229-
exe .a:command
3229+
exe a:command
32303230
endif
32313231

32323232
if pendingQuit

tests/__resultlistdo.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resultlistdo
2+
resultlistopen

tests/_setup.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ let g:EasyGrepDefaultUserPattern="alphabet.in"
33
let g:EasyGrepMode=3
44
let g:EasyGrepExtraWarnings=0
55
let g:EasyGrepEnableLogging=1
6+
let g:EasyGrepAutomatedTest=1
67

tests/resultlistdo.ok

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
|1 col 1| GrepAdd resultlist
2+
__resultlistdo.in|1 col 1| resultlistdo
3+
__resultlistdo.in|2 col 1| resultlistopen
4+
__resultlistdo.in|1 col 1| GrepAdd resultlistfroo
5+
__resultlistdo.in|1 col 1| resultlistfroo
6+
__resultlistdo.in|1 col 1| GrepAdd resultlist
7+
__resultlistdo.in|1 col 1| resultlistdo
8+
__resultlistdo.in|2 col 1| resultlistopen

tests/resultlistdo.vim

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
let testname="resultlistdo"
3+
let g:EasyGrepDefaultUserPattern="__resultlistdo.in"
4+
let g:EasyGrepMode=3
5+
6+
" Search
7+
ResultListTag GrepAdd resultlist
8+
GrepAdd resultlist
9+
10+
" Exercise
11+
ResultListDo s/resultlistdo/resultlistfroo/e
12+
wa
13+
14+
" Search
15+
ResultListTag GrepAdd resultlistfroo
16+
GrepAdd resultlistfroo
17+
18+
" Restore the input
19+
ResultListDo s/resultlistfroo/resultlistdo/e
20+
wa
21+
22+
" Search again
23+
ResultListTag GrepAdd resultlist
24+
GrepAdd resultlist
25+
26+
" Save results
27+
exe "ResultListSave ".testname.".out"
28+
29+
cclose
30+
quitall!

tests/vimgrep.suite

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
#-------------------------------------------------------------------------------
3+
# Grep tests
4+
#-------------------------------------------------------------------------------
5+
26
# casesensitivity
37
casesensitivity_ack.vim
48
casesensitivity_ag.vim
@@ -40,3 +44,14 @@ simpleregex_ag.vim
4044
simpleregex_grep.vim
4145
simpleregex_pt.vim
4246
simpleregex_vimgrep.vim
47+
48+
#-------------------------------------------------------------------------------
49+
# ResultList tests
50+
#-------------------------------------------------------------------------------
51+
52+
53+
#-------------
54+
# ResultListDo
55+
#-------------
56+
resultlistdo.vim
57+

0 commit comments

Comments
 (0)