Emacs: List Matching Lines
List Matching Lines, Copy, Count
- Alt+x
list-matching-lines【Alt+s o】 (alias ofoccur) -
- List all lines in the current buffer that matches a Regex pattern.
- Result is shown in a buffer named “*Occur*”.
- Clicking the line jumps to the match location.
emacs list-matching-lines 2021-07-18 - Alt+x
copy-matching-lines -
Copy lines that matches a regex pattern.
- Alt+x
count-matches(alias ofhow-many) -
- Print number of matches by Emacs: Regular Expression.
- Count starts at current cursor position to end of buffer.
Delete Matching Lines, Delete and Copy, Delete Duplicate Lines
- Alt+x
kill-matching-lines -
Copy and delete matching lines
- Alt+x
delete-matching-lines(alias offlush-lines) -
- Delete lines that match a Regex.
- Works on text selection or starts at the line your cursor is on.
- Alt+x
delete-non-matching-lines(alias ofkeep-lines) -
Delete non-matching lines.
- Alt+x
delete-duplicate-lines -
Delete duplicate lines in text selection.
List Lines in ALL Buffers
Alt+x multi-occur if you want to list lines in ALL buffers.