How to switch between two latest windows in tmux?

944

Solution 1

To do this in tmux, you do

Ctrl-Bl

(that is an 'L'). This assumes you have left Ctrl-B as your activation key.

If you want to use the same keypresses as screen, then add the following to your ~/.tmux.conf:

set-option -g prefix C-a
bind-key C-a last-window

The first sets Ctrl-A as your activation key, the second says Ctrl-A after activation should go to the last window.

Solution 2

Paul's answer is correct, but it seems to leave you without a way to type ^A.

See this thread for details, but essentially you can do this to get a C-a (^A) if you need one:

bind-key v send-prefix

Now if you type C-a v you'll get a ^A.

Solution 3

To follow on to fbicknel and Paul:

you can

bind-key C-a last-window
bind-key a send-prefix

which will let you use a screen-like "ctrl-a a" to insert a 'ctrl a'

Share:
944

Related videos on Youtube

keshet
Author by

keshet

Updated on September 18, 2022

Comments

  • keshet
    keshet over 1 year

    I have a strange issue with ComboBox:

    1. The control is located in xml fragment, inside sap.m.IconTabFilter.

    2. I select a value in the combobox, then select another IconTabFilter.

    3. Then I return to the previous tab, where the combobox is located.

    4. The value of the combobox is cleared (I see a placeholder again), but when I open the dropdown menu of the combobox, I see that the item I have selected previously is highlighted and I can't select it again, like it's already been selected.

    No function runs when switching tabs, no models are refreshed.

    I tried to reproduce the issue, but my new code snippet works fine - the value is not cleared when I switch tabs. What could it be?

    Here is one of the ComboBoxes' definition:

    <ComboBox id="comboid" items="{path: 'modelName>/'}"  placeholder="{i18n>select}" selectionChange="onChange" customData:userProfileSetting="userId">
        <core:Item text="{modelName>ID} {modelName>VALUE}" key="{modelName>ID}"/>
    </ComboBox>
    
    • Admin
      Admin about 7 years
      Can you post the code that is not working?
    • keshet
      keshet about 7 years
      @Sid I've updated the post with one of the ComboBox's definition.
    • Admin
      Admin about 7 years
      Code looks okay. Few questions: Have you used addDependent when adding the XML fragment? Have you set more than one model on the View that is the parent of the fragment?
    • poige
      poige almost 4 years
      that's easily answered yourself question. Another one — which is a way harder to answer is how to switch to the last window
  • Admin
    Admin about 7 years
    Just out of curiosity - why are you limited to 1.28? Is it older browser support or something like that?
  • keshet
    keshet about 7 years
    @Sid yes, I'm limited to 1.28 - this is the version the client has on his server. And sorry for not pointing out in the question this versioning "elefant in the room".