Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs: how to select all text in double-quotes automatically from current focused position?

Tags:

emacs

After search for a long time, I refer to here.

if current position is between 2 double-quotes, is there any command can mark all text in the 2 double-quotes?

like image 909
aaron Avatar asked Apr 25 '12 13:04

aaron


2 Answers

If you're one to work with the mouse, double-clicking selects text including the double-quotes.

expand-region allows you to select expanding lexical units of text one of the stopping points is string without quotes, and the one after that is string including quotes.

like image 50
event_jr Avatar answered Sep 30 '22 04:09

event_jr


You can create a macro for it and save that macro for later use. The macro would do:

  1. backward search for "
  2. set the mark
  3. forward search for "
like image 29
Nicolas Dudebout Avatar answered Sep 30 '22 02:09

Nicolas Dudebout