# \#grep

**URL:** https://discuss.kakoune.com/tag/grep/7.md

[Latest](https://discuss.kakoune.com/latest.md) · [Categories](https://discuss.kakoune.com/categories.md) · [Tags](https://discuss.kakoune.com/tags.md)

---

## [Selecting whole buffer immediately after a grep command](https://discuss.kakoune.com/t/selecting-whole-buffer-immediately-after-a-grep-command/2750)

<div class="topic-metadata">

**Author:** [@albak](https://discuss.kakoune.com/u/albak)\
**Replies:** 2\
**Last updated:** [September 4, 2025, 10:21pm UTC](https://discuss.kakoune.com/t/selecting-whole-buffer-immediately-after-a-grep-command/2750 "2025-09-04T22:21:53Z")

</div>

Hello fellow mouilleurs I’m trying to create a command that greps a pattern in a buffer, selects the whole grep buffer and applies a few commands (aligns the matched patterns). I am getting an error/inconsistency. My c…

---

## [What is the better way to search string in project?](https://discuss.kakoune.com/t/what-is-the-better-way-to-search-string-in-project/2374)

<div class="topic-metadata">

**Author:** [@lauccode](https://discuss.kakoune.com/u/lauccode)\
**Replies:** 2\
**Last updated:** [March 6, 2024, 5:58pm UTC](https://discuss.kakoune.com/t/what-is-the-better-way-to-search-string-in-project/2374 "2024-03-06T17:58:32Z")

</div>

I found the following to grep but I didn’t found a complete solution to preview and filter : 1) fzf.kak is public archive but always very good I’m not sure it will be working in time but until now, it is. Do you know h…

---

## [Semgrep : semantic grep](https://discuss.kakoune.com/t/semgrep-semantic-grep/1624)

<div class="topic-metadata">

**Author:** [@Delapouite](https://discuss.kakoune.com/u/Delapouite)\
**Replies:** 1\
**Last updated:** [March 28, 2021, 10:44pm UTC](https://discuss.kakoune.com/t/semgrep-semantic-grep/1624 "2021-03-28T22:44:21Z")

</div>

Hello I stumble upon this great tool a while ago. I was almost sure that I learned about it on this very forum, but no search results are returned for “semgrep”, so I guess it’s the perfect time to introduce it. (maybe …

---

## [BufPreWrite hook dependent on buffer content](https://discuss.kakoune.com/t/bufprewrite-hook-dependent-on-buffer-content/1598)

<div class="topic-metadata">

**Author:** [@basbebe](https://discuss.kakoune.com/u/basbebe)\
**Replies:** 3\
**Last updated:** [March 16, 2021, 12:41pm UTC](https://discuss.kakoune.com/t/bufprewrite-hook-dependent-on-buffer-content/1598 "2021-03-16T12:41:26Z")

</div>

Hi! The Problem I want markdown files to get autoformatted on safe. For that, I want to use pandoc. Since I have markdown files with pandoc’s YAML markdown header and latex content, I need to consider that. Since the …

---

## [Single command for grep-next-match in similar buffers (lsp/make/find)](https://discuss.kakoune.com/t/single-command-for-grep-next-match-in-similar-buffers-lsp-make-find/1215)

<div class="topic-metadata">

**Author:** [@krobelus](https://discuss.kakoune.com/u/krobelus)\
**Replies:** 4\
**Last updated:** [August 19, 2020, 6:46pm UTC](https://discuss.kakoune.com/t/single-command-for-grep-next-match-in-similar-buffers-lsp-make-find/1215 "2020-08-19T18:46:37Z")

</div>

In Vim many things go into the same error list whereas Kakoune tends to use different buffers with filetype=grep. This is nice because I can browse them independently. However, when pressing my shortcut for grep-{next,p…

---

## [Grep buffer sorted by: group | file | numerical position](https://discuss.kakoune.com/t/grep-buffer-sorted-by-group-file-numerical-position/659)

<div class="topic-metadata">

**Author:** [@duncan](https://discuss.kakoune.com/u/duncan)\
**Replies:** 3\
**Last updated:** [May 29, 2020, 11:41am UTC](https://discuss.kakoune.com/t/grep-buffer-sorted-by-group-file-numerical-position/659 "2020-05-29T11:41:59Z")

</div>

Uses grep.kak command and sorts the \*grep\* buffer contents based on alphabetical grouping. Community request for a solution to group by file name, ascending numerically, within their alphabetical groups. Example: alph…

---

## [Multiple named grep buffers](https://discuss.kakoune.com/t/multiple-named-grep-buffers/513)

<div class="topic-metadata">

**Author:** [@robertmeta](https://discuss.kakoune.com/u/robertmeta)\
**Replies:** 0\
**Last updated:** [May 2, 2019, 12:22pm UTC](https://discuss.kakoune.com/t/multiple-named-grep-buffers/513 "2019-05-02T12:22:12Z")

</div>

I also mark the words in my version. https://asciinema.org/a/anrwaoGRnH2wncYOD5rGEGr5c More discussion: Multi-grep workflow improvements

---

## [Goto top of \*grep\* buffer after each run of grep](https://discuss.kakoune.com/t/goto-top-of-grep-buffer-after-each-run-of-grep/727)

<div class="topic-metadata">

**Author:** [@schickm](https://discuss.kakoune.com/u/schickm)\
**Replies:** 2\
**Last updated:** [September 21, 2019, 9:55pm UTC](https://discuss.kakoune.com/t/goto-top-of-grep-buffer-after-each-run-of-grep/727 "2019-09-21T21:55:45Z")

</div>

I like to read my grep results from top to bottom, but grep.kak always leaves the cursor at the bottom of the buffer. I’m trying to figure out how to move it to the top after each time I’ve run grep. So far I’ve tried …

---

## [Flygrep like grepping in Kakoune](https://discuss.kakoune.com/t/flygrep-like-grepping-in-kakoune/662)

<div class="topic-metadata">

**Author:** [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Replies:** 9\
**Last updated:** [July 22, 2019, 12:27am UTC](https://discuss.kakoune.com/t/flygrep-like-grepping-in-kakoune/662 "2019-07-22T00:27:33Z")

</div>

There’s a plugin for Vim, and many plugins for Emacs that do this kind of thing. I did this via fzf.kak through skim, but I’ve thought that it would be nice to have such grep without plugins: define-command -override -d…

---

## [Jumping to file:line:col](https://discuss.kakoune.com/t/jumping-to-filecol/650)

<div class="topic-metadata">

**Author:** [@robertmeta](https://discuss.kakoune.com/u/robertmeta)\
**Replies:** 4\
**Last updated:** [July 14, 2019, 6:58am UTC](https://discuss.kakoune.com/t/jumping-to-filecol/650 "2019-07-14T06:58:45Z")

</div>

if I have a file with lines like foofile.ext:line:col:\\tDescription and I want to be able to turn the lines into jumps is there a filetype I can just turn on or something easy?

---

## [Command Feedback on grepcmd (and friends)](https://discuss.kakoune.com/t/command-feedback-on-grepcmd-and-friends/609)

<div class="topic-metadata">

**Author:** [@robertmeta](https://discuss.kakoune.com/u/robertmeta)\
**Replies:** 2\
**Last updated:** [June 5, 2019, 1:16pm UTC](https://discuss.kakoune.com/t/command-feedback-on-grepcmd-and-friends/609 "2019-06-05T13:16:41Z")

</div>

Normally, when a command is long-running we get a bit of feedback on it in the bar, this feedback goes away if you happen to be using it via grepcmd (I presume lintcmd, etc has the same issue). Should there be feedback …

---

## [Multi-grep workflow improvements](https://discuss.kakoune.com/t/multi-grep-workflow-improvements/500)

<div class="topic-metadata">

**Author:** [@robertmeta](https://discuss.kakoune.com/u/robertmeta)\
**Replies:** 11\
**Last updated:** [May 2, 2019, 11:51am UTC](https://discuss.kakoune.com/t/multi-grep-workflow-improvements/500 "2019-05-02T11:51:04Z")

</div>

map global user g %{\<A-i\>w,m\<esc\>:grep \<C-r\>.\<ret\>\<esc\>:evaluate-commands %sh{echo rename-buffer \*grep\*:\`uuidgen\`}\<ret\>} I am loving having multiple grep’s that I can walk forward and back across with C-o C-i – what I a…
