I want to select whole environment by just double clicking on \begin{environment} or \end{environment}. Maybe someone already did this?

Also how can I change definition of a word that double clicking on \command selects not only word 'command' but also a slash in front of it, however I don't want to select subsequent slash if it exists.

  • Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it).
    – Guido
    Commented Nov 16, 2012 at 12:37
  • 1
    While it exists, mouse support in emacs isn't a key feature : most users try to avoid it as much as possible (or have no choice when using emacs without a graphical session), and some "powerusers" tend to despise mouse users. That being said, this behavior is certainly achievable, but it may be hard to find someone willing to work on it. What do you exactly want to achieve by selecting a whole environment or a command less its backslash? Maybe we can find workarounds.
    – T. Verron
    Commented Nov 16, 2012 at 18:35
  • Could you post a small example of what you wish to accomplish by changing the definition of a word 'command' without the backslash?
    – Ricardo
    Commented Nov 16, 2012 at 19:31

1 Answer 1


The keyboard shortcut for environment selection in AUCTeX is C-c . with the point within the environment you wish to select.

I'm focusing on your need to select the environment and ignoring your desire to double-click it. As T. Verron said, this is possible, but not necessarily desirable.


For your proposed example, you would first mark the region that contains your float with C-c .; then you would kill the marked region with C-w, move the point to the new best place for your float and yank it with C-y. AUCTeX outline mode might come in handy if you are working with larger projects.

  • When I am formatting layouts of papers for me it is more comfortable to use mouse when i want to change the location of floating objects. Zoom out find appropriate place for floating object, double click on '\begin{floating_object}' cut and paste where you want. Maybe mouse seems handy for me because I am windows user :). However I am trying to change my habits. Another thing that i need is a command that selects whole word if my cursor is in the middle of it, together with backslash in front of it (if it is there). And how can i change definition of a word, to change movement measures?
    – Baranas
    Commented Nov 17, 2012 at 8:33
  • Could you provide me with an example of what you wish to accomplish by selecting a word including the backslash? Perhaps there's a different way of accomplishing it without selecting the word.
    – Ricardo
    Commented Nov 19, 2012 at 19:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .