Linux

  1. Home
  2. Computing & Technology
  3. Linux

By Juergen Haas, About.com

If you click on a character with open-parenthesis or close-parenthesis syntax, it sets the region around the parenthetical grouping which that character starts or ends. If you click on a character with string-delimiter syntax (such as a singlequote or doublequote in C), it sets the region around the string constant (using heuristics to figure out whether that character is the beginning or the end of it).

  • Double-Drag-Mouse-1
    This key selects a region made up of the words you drag across.
  • Triple-Mouse-1
    This key sets the region around the line you click on.
  • Triple-Drag-Mouse-1
    This key selects a region made up of the lines you drag across.

    The simplest way to kill text with the mouse is to press Mouse-1 at one end, then press Mouse-3 twice at the other end. See Killing. To copy the text into the kill ring without deleting it from the buffer, press Mouse-3 just once--or just drag across the text with Mouse-1. Then you can copy it elsewhere by yanking it.

    To yank the killed or copied text somewhere else, move the mouse there and press Mouse-2. See Yanking. However, if mouse-yank-at-point is non-nil, Mouse-2 yanks at point. Then it does not matter where you click, or even which of the frame's windows you click on. The default value is nil. This variable also affects yanking the secondary selection.

    To copy text to another X window, kill it or save it in the kill ring. Under X, this also sets the primary selection. Then use the "paste" or "yank" command of the program operating the other window to insert the text from the selection.

    To copy text from another X window, use the "cut" or "copy" command of the program operating the other window, to select the text you want. Then yank it in Emacs with C-y or Mouse-2.

    The standard coding system for X selections is compound-text. To specify another coding system for X selections, use C-x <RET> x or C-x <RET> X. See Specify Coding.

    These cutting and pasting commands also work on MS-Windows.

    When Emacs puts text into the kill ring, or rotates text to the front of the kill ring, it sets the primary selection in the X server. This is how other X clients can access the text. Emacs also stores the text in the cut buffer, but only if the text is short enough (the value of x-cut-buffer-max specifies the maximum number of characters putting long strings in the cut buffer can be slow. [p]The commands to yank the first entry in the kill ring actually check first for a primary selection in another program; after that, they check for text in the cut buffer. If neither of those sources provides text to yank, the kill ring contents are used. _z_linux_z_);

  • Explore Linux

    About.com Special Features

    Build Your Own Website

    Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

    Connect Your Home Computers

    Easy ways to connect two computers for networking purposes. More >

    Linux

    1. Home
    2. Computing & Technology
    3. Linux

    ©2009 About.com, a part of The New York Times Company.

    All rights reserved.