Jump to content
Bhishan

[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

Share this post


Link to post

@vitor  For some reasons  Cmd `   did not worked for me.

I just remapped it to be Alt Cmd `   and disabled original alt-cmd-` combo.

Now it works.

No need to write any workflows, it was a hidden built-in feature.

 

Thanks a lot.

Share this post


Link to post

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
×