Skip to content

Commit

Permalink
add: the tips to configure the default args for grep command
Browse files Browse the repository at this point in the history
  • Loading branch information
sakurawald authored and vindarel committed Dec 10, 2024
1 parent d5e3548 commit b8373d4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions content/en/usage/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,13 @@ to re-play the macro only in the selected region.
M-x grep

this presents the results in a two-panes window. You can edit lines in the results buffer, changes are reflected immediately on the files, and updated on the right side. You can use search and replace `M-x query-replace` in the results buffer.

> To set the default args for grep command, put this in your `~/.lem/init.lisp` file.
> ```
> (setf lem/grep:*grep-args* "-niHI")
> (setf lem/grep::*last-query* "git grep -niHI ")
> ```
>
See also: `M-x project-grep`, bound to `C-x p g`.
Expand Down
7 changes: 7 additions & 0 deletions content/ja/usage/keybindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ You can do more and *list all Lem's existing keybindings* with `M-x documentatio

this presents the results in a two-panes window. You can edit lines in the results buffer, changes are reflected immediately on the files, and updated on the right side. You can use search and replace `M-x query-replace` in the results buffer.

> To set the default args for grep command, put this in your `~/.lem/init.lisp` file.
> ```
> (setf lem/grep:*grep-args* "-niHI")
> (setf lem/grep::*last-query* "git grep -niHI ")
> ```
>
## multiple cursors
Use `M-C` (Alt and capital c), `M-x add-cursors-to-next-line` to add a cursor to the next line.
7 changes: 7 additions & 0 deletions content/zh-TW/usage/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,13 @@ You can do more and *list all Lem's existing keybindings* with `M-x documentatio
M-x grep

this presents the results in a two-panes window. You can edit lines in the results buffer, changes are reflected immediately on the files, and updated on the right side. You can use search and replace `M-x query-replace` in the results buffer.

> To set the default args for grep command, put this in your `~/.lem/init.lisp` file.
> ```
> (setf lem/grep:*grep-args* "-niHI")
> (setf lem/grep::*last-query* "git grep -niHI ")
> ```
>
## multiple cursors
Expand Down

0 comments on commit b8373d4

Please sign in to comment.