2008-10-15

xterm-mouse-mode

When using Emacs in console mode, sometimes you just want to move the cursor to a location in the buffer. You can hit up, down, left and right key a hundred times to get there or you can just use mouse. But how? The xterm-mouse-mode will do the trick. Read this,

26.20 Using a Mouse in Terminal Emulators

Some terminal emulators support mouse clicks in the terminal window.

In a terminal emulator which is compatible with xterm, you can use M-x xterm-mouse-mode to give Emacs control over simple use of the mouse—basically, only non-modified single clicks are supported. The normal xterm mouse functionality for such clicks is still available by holding down the SHIFT key when you press the mouse button. Xterm Mouse mode is a global minor mode (see Minor Modes). Repeating the command turns the mode off again.
In the console on GNU/Linux, you can use M-x t-mouse-mode. You need to have the gpm package installed and running on your system in order for this to work.

The original mouse copy-and-paste is still available by holding down the SHIFT plus left mouse button. I didn't know this until I turned to this page of the manual. It is proven that reading manual is helpful to your skill. :)

沒有留言:

張貼留言