<commit_before>#!/usr/bin/env bash

default_pane_resize="5"

# tmux show-option "q" (quiet) flag does not set return value to 1, even though
# the option does not exist. This function patches that.
get_tmux_option() {
	local option=$1
	local default_value=$2
	local option_value=$(tmux show-option -gqv "$option")
	if [ -z $option_value ]; then
		echo $default_value
	else
		echo $option_value
	fi
}

pane_navigation_bindings() {
	tmux bind-key h   select-pane -L
	tmux bind-key C-h select-pane -L
	tmux bind-key k   select-pane -D
	tmux bind-key C-k select-pane -D
	tmux bind-key j   select-pane -U
	tmux bind-key C-j select-pane -U
	tmux bind-key l   select-pane -R
	tmux bind-key C-l select-pane -R
}

window_move_bindings() {
	tmux bind-key -r "<" swap-window -t -1
	tmux bind-key -r ">" swap-window -t +1
}

pane_resizing_bindings() {
	local pane_resize=$(get_tmux_option "@pane_resize" "$default_pane_resize")
	tmux bind-key -r H resize-pane -L "$pane_resize"
	tmux bind-key -r K resize-pane -D "$pane_resize"
	tmux bind-key -r J resize-pane -U "$pane_resize"
	tmux bind-key -r L resize-pane -R "$pane_resize"
}

pane_split_bindings() {
	tmux bind-key "|" split-window -h -c "#{pane_current_path}"
	tmux bind-key "-" split-window -v -c "#{pane_current_path}"<commit_msg>go to j for down and k for up in navigation and swapping but keep j up and k down for resizing<commit_after>#!/usr/bin/env bash

default_pane_resize="5"

# tmux show-option "q" (quiet) flag does not set return value to 1, even though
# the option does not exist. This function patches that.
get_tmux_option() {
	local option=$1
	local default_value=$2
	local option_value=$(tmux show-option -gqv "$option")
	if [ -z $option_value ]; then
		echo $default_value
	else
		echo $option_value
	fi
}

pane_navigation_bindings() {
	tmux bind-key h   select-pane -L
	tmux bind-key C-h select-pane -L
	tmux bind-key j   select-pane -D
	tmux bind-key C-j select-pane -D
	tmux bind-key k   select-pane -U
	tmux bind-key C-k select-pane -U
	tmux bind-key l   select-pane -R
	tmux bind-key C-l select-pane -R
}

window_move_bindings() {
	tmux bind-key -r "<" swap-window -t -1
	tmux bind-key -r ">" swap-window -t +1
}

pane_resizing_bindings() {
	local pane_resize=$(get_tmux_option "@pane_resize" "$default_pane_resize")
	tmux bind-key -r H resize-pane -L "$pane_resize"
	tmux bind-key -r K resize-pane -D "$pane_resize"
	tmux bind-key -r J resize-pane -U "$pane_resize"
	tmux bind-key -r L resize-pane -R "$pane_resize"
}

pane_split_bindings() {
	tmux bind-key "|" split-window -h -c "#{pane_current_path}"
	tmux bind-key "-" split-window -v -c "#{pane_current_path}"
{'fraction_non_alphanumeric': 0.12609191036840106, 'fraction_numerical': 0.004557538928978352, 'mean_word_length': 3.6210526315789475, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6154622', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1057, 'n_words': 312}