Jump to content

[SOLVED] Switch Between Multiple Terminal Windows


Recommended Posts

Many times I am running TWO bash terminals at the same time.

In one terminal I can write code in vim editor,  and in second terminal I can run the code, or do another things.

 

I was looking if I can have some keyboard shortcut to switch between two terminals, without using mouse.

cmd-tab will switch through all the open apps, not only two opened terminals.

 

I was wondering how to achieve the goal.

 

I have shared my workflow here.

 

I found a code to activate the current terminal window from any frontmost app, but still looking for code to switch between two terminals.

 

# Ref: https://apple.stackexchange.com/questions/231112/open-the-same-terminal-without-switching-spaces
tell application "Terminal"
    if not application "Terminal" is running then
        activate
    else
        if (exists window 1) then
            activate
        else
            do script ""
            activate
        end if
    end if
end tell

 

Thanks a lot!

Edited by Bhishan
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...