Você pode fazer isso usando a função new-window
(à qual o prefixo c está vinculado), adicionando uma opção -a
, por exemplo,
bind-key -c C new-window -a
faz com que o prefixo C crie uma nova janela após a atual (ao invés de no final da lista).
A página de manual é um pouco obscura (ajuda a ler a fonte código):
new-window [
-adkP
] [-c
start-directory] [-F
format] [-n
window-name] [-t
target-window] [shell-command]
(alias:neww
)
Create a new window. With-a
, the new window is inserted at the next index up from the specified target-window, moving windows up if necessary, otherwise target-window is the new window location.If
-d
is given, the session does not make the new window the current window. target-window represents the window to be created; if the target already exists an error is shown, unless the-k
flag is used, in which case it is destroyed. shell-command is the command to execute. If shell-command is not specified, the value of the default-command option is used.-c
specifies the working directory in which the new window is created.
O código-fonte ( cmd-find.c
) fornece a dica em cmd_find_target
omitir a opção -t
é o caminho a seguir:
/* An empty or NULL target is the current. */
if (target == NULL || *target == 'bind-key -c C new-window -a
')
goto current;