Skip to content

Commit 557852d

Browse files
committed
tmux: fix C-w issue w emacs; add binding to easily navigate windows
1 parent fde84dc commit 557852d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tmux/tmux.conf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ bind c new-window -c "~" -n "" \; display-message "Consider using C-t to create
4141
bind -n C-t new-window -c "~" -n ""
4242

4343
# close a window with C-w (with confirm-before)
44-
bind -n C-w confirm-before -y -p "Close window? (Y/n)" "kill-window"
44+
# note: am not using -n flag because this would conflict with emacs cut
45+
bind C-w confirm-before -y -p "Close window? (Y/n)" "kill-window"
4546

4647
# split panes using | and -; new pane defaults to current directory
4748
bind | split-window -h -c "#{pane_current_path}"
@@ -57,8 +58,11 @@ set -g mouse on
5758
set -g allow-rename off
5859

5960
# allow re-ordering of tmux windows (source: https://superuser.com/questions/343572/how-do-i-reorder-tmux-windows)
60-
bind-key Left swap-window -d -t -1
61-
bind-key Right swap-window -d -t +1
61+
bind Left swap-window -d -t -1
62+
bind Right swap-window -d -t +1
63+
# move through windows easily with arrow keys
64+
bind -n Left previous-window
65+
bind -n Right next-window
6266

6367
# Make messages appear for 3 seconds
6468
set -g display-time 3000

0 commit comments

Comments
 (0)