Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Another method of switching Terminal windows Apps
I discovered this hint whilst remotely setting up an LDAP server. I had several Terminal windows open and was using emacs in one of them. I inadvertently hit Command-Right Arrow, thinking it would get me to the end of the next word as it does in Carbon Emacs. Instead, it actually moved the focus to the next Terminal window that I had open (and Command-Left Arrow moved it back).

As this isn't documented in the Window » Next Terminal and Previous Terminal commands (they list Command-Backtick and Command-Tilde), I thought this might be a useful keystroke for those people who use lots of terminals every day. I find it much more convenient than stretching for the default shortcuts, or even Command-1, Command-2, etc. I hope it helps someone else.
    •    
  • Currently 2.00 / 5
  You rated: 1 / 5 (5 votes cast)
 
[6,610 views]  

Another method of switching Terminal windows | 3 comments | Create New Account
Click here to return to the 'Another method of switching Terminal windows' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another method of switching Terminal windows
Authored by: jzdziarski on Feb 13, '07 10:23:25AM

What's wrong with Command-~ ? It's natural for most of us as it's right next to Command-tab, which is what we'd be using in *nix.



[ Reply to This | # ]
Spatial Terminal Switching
Authored by: escowles on Feb 13, '07 10:50:21AM
And, if you open terminals in order and place them in order, you can cycle through them with Cmd-Right going clockwise and Cmd-Left going counter-clockwise. I wrote a small applescript to setup 4 terms in order:

tell application "Terminal"
	repeat while the (count of windows) is less than 4
		do script ""
	end repeat
	set windowList to the windows
end tell

updateWindow(the first item in windowList, 2, 23, 80, 30)
updateWindow(the second item in windowList, 2, 474, 80, 30)
updateWindow(the third item in windowList, 508, 474, 80, 30)
updateWindow(the fourth item in windowList, 508, 23, 80, 30)

on updateWindow(theWindow, x, y, cols, rows)
	tell application "Terminal"
		set the position of theWindow to {x, y}
		set the number of rows of theWindow to rows
		set the number of columns of theWindow to cols
	end tell
end updateWindow

Of course, the coordinates and sizes will vary depending on your screen size and tastes. I've got slightly different scripts for 2, 4 and 6-term setups, depending on what I'm working on. I also like a couple of pixels around and between my terms, but this could be adjusted to have them exactly at the edges and touching each other.

-Esme



[ Reply to This | # ]
Another method of switching Terminal windows
Authored by: bugmenot on Feb 13, '07 04:55:29PM

Pretzel-left arrow and Pretzel-right arrow have been the default (and marked in the Window menu) key combos for switching windows in Terminal.app since 10.3 (and 10.2 I think).



[ Reply to This | # ]