os atalhos de teclado do tmux não estão funcionando corretamente

3

Eu comecei a usar o tmux do recent, e mudei as ligações para que ele respondesse ao C-a ao invés do C-b. Estas são as linhas no arquivo .tmux.conf para fazer isso:

unbind C-b
set -g prefix C-a

Mas não consigo fazer com que o C-a funcione para o começo da linha. C-a, C-a não funciona, nem C-a, a. Além disso, outros atalhos como C-a, < alguma tecla de seta > mover entre painéis não funciona. O que estou perdendo?

Obrigado!

    
por shlomoid 12.12.2011 / 23:37

2 respostas

6

Você faz parte do caminho até lá. unbind C-b desativa o prefixo padrão e set -g prefix C-a configura C-a como o novo prefixo de comando como tela. Para obter os outros comportamentos da tela, adicione mais algumas linhas:

set -g prefix C-a
unbind C-b

# C-a a should send ctrl-a to the underlying shell (move to start of line)
bind-key a send-prefix    

# C-a C-a
bind-key C-a last-window
    
por 29.02.2012 / 19:47
1

C-a, C-a não vai funcionar por razões muito óbvias. Man mostra isso como keybinds padrão:

 The default command key bindings are:

       C-b         Send the prefix key (C-b) through to the application.
       C-o         Rotate the panes in the current window forwards.
       C-z         Suspend the tmux client.
       !           Break the current pane out of the window.
       "           Split the current pane into two, top and bottom.
       #           List all paste buffers.
       $           Rename the current session.
       %           Split the current pane into two, left and right.
       &           Kill the current window.
       '           Prompt for a window index to select.
       ,           Rename the current window.
       -           Delete the most recently copied buffer of text.
       .           Prompt for an index to move the current window.
       0 to 9      Select windows 0 to 9.
       :           Enter the tmux command prompt.
       ;           Move to the previously active pane.
       =           Choose which buffer to paste interactively from a list.
       ?           List all key bindings.
       D           Choose a client to detach.
       [           Enter copy mode to copy text or view the history.
       ]           Paste the most recently copied buffer of text.
       c           Create a new window.
       d           Detach the current client.
       f           Prompt to search for text in open windows.
       i           Display some information about the current window.
       l           Move to the previously selected window.
       n           Change to the next window.
       o           Select the next pane in the current window.
       p           Change to the previous window.
       q           Briefly display pane indexes.
       r           Force redraw of the attached client.
       s           Select a new session for the attached client interac‐
                   tively.
       L           Switch the attached client back to the last session.
       t           Show the time.
       w           Choose the current window interactively.
       x           Kill the current pane.
       {           Swap the current pane with the previous pane.
       }           Swap the current pane with the next pane.
       ~           Show previous messages from tmux, if any.
       Page Up     Enter copy mode and scroll one page up.
       Up, Down
       Left, Right
                   Change to the pane above, below, to the left, or to the
                   right of the current pane.
       M-1 to M-5  Arrange panes in one of the five preset layouts: even-
                   horizontal, even-vertical, main-horizontal, main-verti‐
                   cal, or tiled.
       M-n         Move to the next window with a bell or activity marker.
       M-o         Rotate the panes in the current window backwards.
       M-p         Move to the previous window with a bell or activity
                   marker.
       C-Up, C-Down
       C-Left, C-Right
                   Resize the current pane in steps of one cell.
       M-Up, M-Down
       M-Left, M-Right
                   Resize the current pane in steps of five cells.

 Key bindings may be changed with the bind-key and unbind-key commands.

Meus keybinds atuais (que eu mudei alguns) estão aqui: link

Meu ~ / .tmux.conf está aqui: link

    
por 14.12.2011 / 18:02

Tags