This is a companion discussion topic for the original entry at https://thoughtbot.com/upcase/videos/tmux-navigation
Iām having trouble when trying to use Ctrl and the arrow keys to resize panes because OSXās shortcuts for dash (Ctrl and Left) and expose (Ctrl and Up) kick in instead. I thought I saw it mentioned in the video at one point, but is there a way to make iTerm2 do the right thing and let other apps allow the shortcut keys to work as normal?
Edit: Hereās my tmux.conf: dotfiles/tmux.conf at main Ā· aaronmcadam/dotfiles Ā· GitHub
Iām not aware of a way to override OS-level keybindings like that.
Any thoughts, @christoomey?
Hello @aaronmcadam, Iām not aware of a way to make OS X bypass system key bindings when certain apps are active.
You can disable the OS X shortcuts if youād prefer to use the tmux key bindings I presented. Go to Preferences ā Keyboard ā Shortcuts (tab) and uncheck them.
Alternately, you can change the tmux key-bindings to something not taken by the system.
Hope that helps!
Loving these series so far! Keeping the current pane when splitting windows is tremendously useful.
If anybody else struggled with making the awesome tat
script work on fish, I translated it into a fish function.
Hi,
How do I mark that I watched this video? I usually download video and then watch it.
@izbor I just scroll (fast forward) to the end of the video
Thank you Sajoku
For anyone using tmate for pairing, note that pane_current_path
wonāt work. Iāve described an alternative approach here:
http://blog.andywaite.com/2015/03/01/opening-new-panes-in-tmate/
Iām trying to work with zooming more often but canāt really think of a nice prefix key to handle this.(something other than prefix+z). Does anyone have a nice key combo for this feature? I canāt find any one using this is any tmux.conf files.
I think @melanie is using this feature in the latest weekly iteration. Are you using some other prefix key for this? I checked your dotfiles but couldnāt find anything
Zooming
If you temporarily want to focus on the contents of a single pane, you can use the zooming functionality added to tmux in version 1.9, which will cause the current pane to temporarily occupy the entire window. When ready, you can unzoom the pane and it will return to the position and size it originally occupied.
Pane zooming is bound by default to <prefix>z, and this acts as a toggle to both zoom a pane and unzoom as needed.
Iām having the same issue as aaronmcadam
when I press shift + Up or shift + Down, I,m moving through the command history, getting a previous or next command.
On the other hand the shift + Left and shift + Right key combination is working and resizes the panes horizontally.
I tried using the arrow keys (on Mac), I had to go into system preferences, keyboard, shortcuts, for mission control and uncheck the ^arrow
shortcuts.
I didnāt like the setup, so I changed my key combination to keep me on the home row,
in tmux.conf:
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
@Sajoku
What is your <prefix>
combo?
I set my ācaps lockā key to be control key, so my prefix is <^-a>
. That makes dropping the ring finger down to the z
work out well for me to toggle zoom.
Hi Rory,
No, that didnāt work for me. Also, when I,m trying Ctrl + Up or Ctrl + Down, there appears āuse kā and āuse jā in my vim status bar.
Anthony,
Your getting the āuse kā & āuse jā messages because of the following lines in your vimrc file (if you are using the thoughtbot dotfiles):
" Get off my lawn
nnoremap <Left> :echoe "Use h"<cr>
nnoremap <Right> :echoe "Use l"<cr>
nnoremap <Up> :echoe "Use k"<cr>
nnoremap <Down> :echoe "Use j"<cr>
If you want to use the arrow keys you can remove those lines. Iāve havenāt been using Vim for very long and I like those there to āmakeā me stay on the home row. Thatās one of the great things I like about Vim, you can configure it the way that works for you!
Iām not sure why the other config didnāt work, do you have anything else mapped to capital HJKL? Do you have it up on GitHub?
My prefix is ctrl+s. I do have my caps key set to be ctrl but I never use it. Iāll force myself to use the caps key more often and give your suggestion a try, thanks
Hi Rory,
no, I don,t want to use the arrow keys. My main problem is that I can,t resize the panels up and down. If I click Ctrl + Up or Ctrl + Down, I move through the command history instead of resizing up or down the panel. However, resizing the panels left or right works.
greetins,
Anthony
I switched to iTerm, and now resizing up and down works : )
Anthony,
Can you push your setup to GitHub?
FYI, Iām traveling the next few days so I could be delayed on any responses.
Thanks Rory
Hi Rory, my problem with up and down resizing of panes is fixed (see my previous post).
greetings,
Anthony
Had the same issue with the resize controls. What Iāve done is moved them to a bind-r, e.g:
bind-r C-h resize-pane -L 5
I donāt resize too much once they are set up so I just need to CtrlS then Ctrl h/j/k/l to resize the window. Works reasonably well and helps keep me away from using the arrow keys!