Skip to content

Commit 94d2cc0

Browse files
committed
Adds informations in the readme and plugin file
1 parent adb6d8f commit 94d2cc0

File tree

2 files changed

+40
-10
lines changed

2 files changed

+40
-10
lines changed

README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
1-
vim-grep-operator
2-
=================
1+
# The vim grep operator
32

4-
The vim grep operator inspired by Steve Losh
3+
## Description
4+
5+
The vim grep operator plugin, inspired by Steve Losh and
6+
his book: http://learnvimscriptthehardway.stevelosh.com/
7+
8+
This plugin's has 2 goals:
9+
10+
* bring motion and visual selection to the :grep command
11+
* open the quickfix window on the fly for easy file match navigation
12+
13+
## Installation
14+
15+
Use pathogen or a pathogen compatible plugin manager.
16+
17+
## Suggested ~/.vimrc mappings
18+
19+
nmap <leader>g <Plug>GrepOperatorOnCurrentDirectory
20+
vmap <leader>g <Plug>GrepOperatorOnCurrentDirectory
21+
nmap <leader><leader>g <Plug>GrepOperatorWithFilenamePrompt
22+
vmap <leader><leader>g <Plug>GrepOperatorWithFilenamePrompt
23+
24+
## Examples
25+
26+
`<leader>giw` will grep the current directory for the word under the cursor and
27+
open the quickfix window.
28+
29+
`<leader>ga(` will grep for what's inside the parenthesis including the
30+
parenthesis.
31+
32+
`<leader>gi'` will grep for what's inside the quotes.
33+
34+
Visually select some characters and type `<leader>g`. This will grep for the
35+
selected text.
36+
37+
You can also be prompted for files to grep by using the `<leader><leader>g` mapping.

plugin/grep-operator.vim

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
" The Grep Operator plugin, inspired by Steve Losh and
2-
" his book: http://learnvimscriptthehardway.stevelosh.com/
3-
" Here are example mappings you should put in your .vimrc:
4-
" nmap <leader>g <Plug>GrepOperatorOnCurrentDirectory
5-
" vmap <leader>g <Plug>GrepOperatorOnCurrentDirectory
6-
" nmap <leader><leader>g <Plug>GrepOperatorWithFilenamePrompt
7-
" vmap <leader><leader>g <Plug>GrepOperatorWithFilenamePrompt
1+
" File: grep-operator.vim
2+
" Maintainer: Yann Thomas-Gérard <inside at gmail dot com>
3+
" Version: 0.0.1
4+
" License: This file is placed in the public domain.
85

96
" Mappings for the current directory grep
107
nnoremap

0 commit comments

Comments
 (0)