Skip to content

Commit

Permalink
shoring up tmux commands and getting ride of prompt idiocy
Browse files Browse the repository at this point in the history
  • Loading branch information
northrup committed Dec 23, 2015
1 parent b46513a commit 10a04af
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
20 changes: 7 additions & 13 deletions tmux/tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,11 @@ bind-key ^V split-window -h -p 50 -c "#{pane_current_path}"
bind-key s split-window -p 50 -c "#{pane_current_path}"
bind-key ^S split-window -p 50 -c "#{pane_current_path}"

# Smart pane switching with awareness of vim splits.
# Source: https://github.com/christoomey/vim-tmux-navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"

# Pane resize in all four directions using vi bindings.
bind -n C-H if-shell "$is_vim" "send-keys C-H" "resize-pane -L 5"
bind -n C-J if-shell "$is_vim" "send-keys C-J" "resize-pane -D 5"
bind -n C-K if-shell "$is_vim" "send-keys C-K" "resize-pane -U 5"
bind -n C-L if-shell "$is_vim" "send-keys C-L" "resize-pane -R 5"
bind -n C-h resize-pane -L 5
bind -n C-j resize-pane -D 5
bind -n C-k resize-pane -U 5
bind -n C-l resize-pane -R 5


# Use vi keybindings for tmux commandline input.
Expand All @@ -36,6 +27,9 @@ set -g status-keys vi
# Use vi keybindings in copy and choice modes
setw -g mode-keys vi

# display pane numbers for longer
set -g display-panes-time 2000

# easily toggle synchronization (mnemonic: e is for echo)
# sends input to all panes in a given window.
bind e setw synchronize-panes on
Expand Down
2 changes: 1 addition & 1 deletion zsh/aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ alias yip='yadr init-plugins'

# PS
alias psa="ps aux"
alias psg="ps aux | grep "
alias psg="ps aux | grep -i"
alias psr='ps aux | grep ruby'

# Moving around
Expand Down
4 changes: 2 additions & 2 deletions zsh/prezto-override/zpreztorc
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ zstyle ':prezto:module:prompt' theme 'sorin'
#

# Enable SSH-Agent protocol emulation.
# zstyle ':prezto:module:gpg-agent' ssh-support 'yes'
zstyle ':prezto:module:gpg-agent' ssh-support 'yes'

#
# SSH-Agent
#

# Enable ssh-agent forwarding.
zstyle ':prezto:module:ssh-agent' forwarding 'yes'
# zstyle ':prezto:module:ssh-agent' forwarding 'yes'

# Set ssh-agent identities to load.
# zstyle ':prezto:module:ssh-agent' identities 'id_rsa' 'id_rsa2' 'id_github'
Expand Down
2 changes: 1 addition & 1 deletion zsh/prezto-themes/prompt_skwp_setup
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function prompt_skwp_setup {
zstyle ':prezto:module:ruby:info:version' format '[%v]'

PROMPT="${__PROMPT_SKWP_COLORS[3]}%n%f@${__PROMPT_SKWP_COLORS[2]}%m%f ${__PROMPT_SKWP_COLORS[5]}%~%f "'$git_info[prompt]'"$ "
RPROMPT='%F{blue}${ruby_info[version]}'
# RPROMPT='%F{blue}${ruby_info[version]}'
}

prompt_skwp_setup "$@"

0 comments on commit 10a04af

Please sign in to comment.