Last active
December 24, 2015 13:09
-
-
Save sri/6802525 to your computer and use it in GitHub Desktop.
Emacs Search & Replace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Emacs Buffer Search | |
================================================== | |
Incremental Search Forward - (default C-s; C-f for me) | |
Incremental Search Backward - (default C-r; C-f C-r for me) | |
Regexp Incremental Search Forward (default C-M-s) | |
Regexp Incremental Search Backward (default C-M-s) | |
Occur (default M-s o): | |
Search lines in a buffer matching a pattern and output in another buffer. | |
Results are clickable. | |
Emacs Buffer Replace | |
================================================== | |
Query Replace (default M-%, C-r for me) | |
Query Regexp Replace (default M-C-%; C-S-r for me) | |
- Space or 'y' to replace match | |
- 'n' to skip to next | |
- ',' to replace but not move point | |
- '!' to say yes to all | |
- '^' to move back to previous match | |
- 'E' to edit replacement string | |
Emacs Replace Across Files: | |
================================================== | |
http://stackoverflow.com/questions/270930/ | |
using-emacs-to-recursively-find-and-replace-in-text-files-not-already-open | |
- M-x find-name-dired | |
- Hit t to "toggle mark" for all files found. | |
- Hit Q for "Query-Replace in Files...". | |
- Same interfaces as query-replace-regexp. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment