Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the emacs command to do full text search across all open buffers? like sublimetext's command+shift+f?

Title pretty much sums up the question. I am learning emacs and have all the basic commands mastered but I don't know how to achieve full text search yet

like image 756
Hrishi Avatar asked Aug 19 '13 06:08

Hrishi


People also ask

What is the command to search on Emacs?

Emacs also offers a simple, or nonincremental, search. To use a more straightforward search, type C-s RETURN or select Search from the Search menu. Type the search string, press RETURN, and Emacs begins the search. Simply press C-s again to repeat the search.

Can you open multiple buffers in Emacs?

Much better to use the multiple buffer feature of emacs. If you are editing the first file and want to start editing the second file, simply use the hot key C-x C-f or the menu selection File->Open File to start the second file. The second file is loaded into its own buffer.

How do I use buffers in Emacs?

Most buffers are created by visiting files, or by Emacs commands that want to display some text, but you can also create a buffer explicitly by typing C-x b bufname RET . This makes a new, empty buffer that is not visiting any file, and selects it for editing. Such buffers are used for making notes to yourself.

What are Emacs commands?

Commands in emacs are either control characters (hold down the <Ctrl> key while typing another character) or are prefixed by one of a set of reserved characters: <Esc> or <Ctrl>-X.


2 Answers

Use M-x multi-occur-in-matching-buffers. You can give a blank for the regexp. Then the expression.

like image 87
abo-abo Avatar answered Oct 05 '22 09:10

abo-abo


There are several good ways to do what you ask. This is a duplicate question. See:

  • Emacs: Is it possible to list all matching lines for a certain query string for marked files in dired?
  • Sublime Text 2's "Goto Anything" (or instant search) for Emacs?
like image 32
Drew Avatar answered Oct 05 '22 07:10

Drew