Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/occivink/kakoune-find
Find and replace on open buffers
https://github.com/occivink/kakoune-find
kakoune plugin replace search
Last synced: 3 months ago
JSON representation
Find and replace on open buffers
- Host: GitHub
- URL: https://github.com/occivink/kakoune-find
- Owner: occivink
- License: unlicense
- Created: 2017-09-19T17:54:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-09-25T09:09:53.000Z (over 2 years ago)
- Last Synced: 2024-08-07T18:33:42.011Z (6 months ago)
- Topics: kakoune, plugin, replace, search
- Language: KakouneScript
- Homepage:
- Size: 26.4 KB
- Stars: 36
- Watchers: 5
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kakoune-find (and replace)
[kakoune](http://kakoune.org) plugin to search for a pattern in all open buffers, and optionally replace it. Works similarly to `grep.kak`, but does not operate on files.
[![demo](https://asciinema.org/a/160951.png)](https://asciinema.org/a/160951)
## Setup
Add `find.kak` to your autoload dir: `~/.config/kak/autoload/`, or source it manually.
## Usage
### Finding
Call the `find` command. You can specify the pattern as the first argument, otherwise the content of the main selection will be used. From the `*find*` buffer you can jump to the actual match using ``.
### Replacing
Replacing is done from the `*find*` buffer. Write directly there the changes that you want to make. Then, call `find-apply-changes`: the changes will be applied back to their respective buffers. Any lines that were not modified are simply ignored.
By default, this command only works on open buffers. However, you can specify `-force` to make kakoune temporarily open the file to write the change.
Since the format is the same as [grep.kak's](https://github.com/mawww/kakoune/blob/master/rc/tools/grep.kak), this command can just as well be used from a `*grep*` buffer. Any line that doesn't follow the `:::` pattern is simply ignored.
## License
Unlicense