Commands Available in the *xref* Buffer
The following commands are provided in the *xref* buffer by the special XREF mode:
-
RET, mouse-1 - Display the reference on the current line (
xref-goto-xref). With prefix argument, also bury the*xref*buffer. - mouse-2
- The same as
mouse-1, but make the window displaying the*xref*buffer the selected window (xref-select-and-show-xref). - n, .
- Move to the next reference and display it in the other window (
xref-next-line). - N
- Move to the first reference of the next reference group and display it in the other window (
xref-next-group). - p, ,
- Move to the previous reference and display it in the other window (
xref-prev-line). - P
- Move to the first reference of the previous reference group and display it in the other window (
xref-prev-group). - C-o
- Display the reference on the current line in the other window (
xref-show-location-at-point). -
r pattern
RETreplacementRET - Perform interactive query-replace on references that match pattern (
xref-query-replace-in-results), replacing the match with replacement. This command can only be used in*xref*buffers that show all the matches for an identifier in all the relevant files. Identifier Search. - g
- Refresh the contents of the
*xref*buffer (revert-buffer). Reverting. - M-,
- Quit the window showing the
*xref*buffer, and then jump to the previous Xref stack location (xref-quit-and-pop-marker-stack). - q
- Quit the window showing the
*xref*buffer (xref-quit).
In addition, the usual navigation commands, such as the arrow keys, C-n, and C-p are available for moving around the buffer without displaying the references.