GNU Emacs
Emacs
Dashboard

21.2 Mouse Commands for Words and Lines

These variants of mouse-1 select entire words or lines at a time. Emacs activates the region around the selected text, which is also copied to the kill ring.

Double-mouse-1

Select the text around the word or character which you click on.

Double-clicking on a character with symbol syntax (such as underscore, in C mode) selects the symbol surrounding that character. Double-clicking on a character with open- or close-parenthesis syntax selects the parenthetical grouping which that character starts or ends. Double-clicking on a character with string-delimiter syntax (such as a single-quote or double-quote in C) selects the string constant (Emacs uses heuristics to figure out whether that character is the beginning or the end of it).

Double-clicking on the beginning of a parenthetical grouping or beginning string-delimiter moves point to the end of the region, scrolling the buffer display forward if necessary to show the new location of point. Double-clicking on the end of a parenthetical grouping or end string-delimiter keeps point at the end of the region by default, so the beginning of the region will not be visible if it is above the top of the window; setting the user option mouse-select-region-move-to-beginning to non- nil changes this to move point to the beginning of the region, scrolling the display backward if necessary.

Double-Drag-mouse-1

Select the text you drag across, in units of whole words.

Triple-mouse-1

Select the line you click on.

Triple-Drag-mouse-1

Select the text you drag across, in units of whole lines.