Allow For Mac Text Controls In Iterm2

10 Must know terminal commands and tips for productivity (Mac edition) Before I start I have to mention this is heavily inclined towards Mac OS, since we’re going to be installing iTerm2, some commands apply for Linux as well.

Active4 years, 1 month ago

after turning on xterm-mouse-mode, any click on the in the screen returns 'mouse-1 is undefined'. What should I be defining 'mouse-1' as? Is there some reason my mouse clicks are returning this event, and not others its suspecting?

Chris
ChrisChris
1,3383 gold badges13 silver badges16 bronze badges

4 Answers

I put this in my .emacs:

and that seems to do the trick, and now a mouse click in a split changes focus to the split.

Note: I am using iterm2, and I found the info here: http://groups.google.com/group/iterm2-discuss/browse_thread/thread/8e1f2ee7db26c07d/17ac15e69c554998?show_docid=17ac15e69c554998&pli=1

DrStrngeluvDrStrngeluv

For Emacs in iTerm 2, I've found that the following bit in my ~/.emacs file works very well, providing the ability to insert the character at an arbitrary location, mark a region, and use the scroll wheel:

Nicholas Riley
38.4k5 gold badges90 silver badges117 bronze badges
bfroehlebfroehle

Mac OS X's Terminal.app does not support mouse reporting. However MouseTerm is a SIMBL plugin that provides it with this feature. http://bitheap.org/mouseterm/

Install MouseTerm and put the following in your Emacs config file:

Stefan
24.5k4 gold badges34 silver badges69 bronze badges
Texthekevintranhekevintran
8,13626 gold badges97 silver badges163 bronze badges

Iterm2 Install Mac

I suspect that installing the emacs-goodies-el will provide the appropriate bindings.

GeorgeGeorge
3,0591 gold badge19 silver badges17 bronze badges
Windows

Iterm2 For Windows 10

Not the answer you're looking for? Browse other questions tagged macosemacsiterm or ask your own question.

Allow For Mac Text Controls In Iterm2 Themes

use the most and now can't live without is the ability to search the contents of the window with command-f (and command-e, command-g, and command-shift-g) with unlimited scroll-back set. None of my windows and linux-using friends can do this and I hear gasps and ahhs and wows when they see me do it. Also, copy-paste doesn't insert hard returns when the lines wrap. Plus, Teminal.app is very stable. I have dozens of terminals open in multiple spaces (I don't like tabs) and they run for months without crashing. I also use option/center-click to position the cursor and command-t to name windows. Does iTerm do all this?
cmd-f, cmd-g, cmd-shift-g, work.
No clue what cmd-e does anyway, so I can't tell you. ;)
For the scroll back buffer, it's variable, and mine is set at 100,000 lines. Not sure what it's upper limit is.
The click to position I'd never heard of, but it does seem to be missing that. I don't like the mouse really (which is why I'm usually on the command line), so that's not a loss for me.
As for the stability, with years of use, I can't remember the last time it's crashed, and I live in the terminal, since I'm a sysadmin and run mostly linux servers (This true for the iTerm app, not the fork mentioned here, but I'll know more until it either crashes or a few weeks pass.)
Certainly worth trying.