Skip to content

Commit 9d92317

Browse files
author
Bruno Sutic
committed
Switch to tab indentation
1 parent 764f91f commit 9d92317

File tree

2 files changed

+30
-28
lines changed

2 files changed

+30
-28
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### master
44
- update readme to reflect github organization change
55
- update readme - more precise binding definition
6+
- switch to tab indentation
67

78
### v0.0.2, 2014-06-03
89
- split-window bindings "|" and "-" now create a new pane with the same path as

pain_control.tmux

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,49 @@ default_pane_resize="5"
55
# tmux show-option "q" (quiet) flag does not set return value to 1, even though
66
# the option does not exist. This function patches that.
77
get_tmux_option() {
8-
local option=$1
9-
local default_value=$2
10-
local option_value=$(tmux show-option -gqv "$option")
11-
if [ -z $option_value ]; then
12-
echo $default_value
13-
else
14-
echo $option_value
15-
fi
8+
local option=$1
9+
local default_value=$2
10+
local option_value=$(tmux show-option -gqv "$option")
11+
if [ -z $option_value ]; then
12+
echo $default_value
13+
else
14+
echo $option_value
15+
fi
1616
}
1717

1818
pane_navigation_bindings() {
19-
tmux bind-key h select-pane -L
20-
tmux bind-key C-h select-pane -L
21-
tmux bind-key j select-pane -D
22-
tmux bind-key C-j select-pane -D
23-
tmux bind-key k select-pane -U
24-
tmux bind-key C-k select-pane -U
25-
tmux bind-key l select-pane -R
26-
tmux bind-key C-l select-pane -R
19+
tmux bind-key h select-pane -L
20+
tmux bind-key C-h select-pane -L
21+
tmux bind-key j select-pane -D
22+
tmux bind-key C-j select-pane -D
23+
tmux bind-key k select-pane -U
24+
tmux bind-key C-k select-pane -U
25+
tmux bind-key l select-pane -R
26+
tmux bind-key C-l select-pane -R
2727
}
2828

2929
pane_resizing_bindings() {
30-
local pane_resize=$(get_tmux_option "@pane_resize" "$default_pane_resize")
31-
tmux bind-key -r H resize-pane -L "$pane_resize"
32-
tmux bind-key -r J resize-pane -D "$pane_resize"
33-
tmux bind-key -r K resize-pane -U "$pane_resize"
34-
tmux bind-key -r L resize-pane -R "$pane_resize"
30+
local pane_resize=$(get_tmux_option "@pane_resize" "$default_pane_resize")
31+
tmux bind-key -r H resize-pane -L "$pane_resize"
32+
tmux bind-key -r J resize-pane -D "$pane_resize"
33+
tmux bind-key -r K resize-pane -U "$pane_resize"
34+
tmux bind-key -r L resize-pane -R "$pane_resize"
3535
}
3636

3737
pane_split_bindings() {
38-
tmux bind-key "|" split-window -h -c "#{pane_current_path}"
39-
tmux bind-key "-" split-window -v -c "#{pane_current_path}"
38+
tmux bind-key "|" split-window -h -c "#{pane_current_path}"
39+
tmux bind-key "-" split-window -v -c "#{pane_current_path}"
4040
}
4141

4242
improve_new_window_binding() {
43-
tmux bind-key "c" new-window -c "#{pane_current_path}"
43+
tmux bind-key "c" new-window -c "#{pane_current_path}"
4444
}
4545

4646
main() {
47-
pane_navigation_bindings
48-
pane_resizing_bindings
49-
pane_split_bindings
50-
improve_new_window_binding
47+
pane_navigation_bindings
48+
window_move_bindings
49+
pane_resizing_bindings
50+
pane_split_bindings
51+
improve_new_window_binding
5152
}
5253
main

0 commit comments

Comments
 (0)