Skip to content

Commit

Permalink
fix(tmux): fix projects dir
Browse files Browse the repository at this point in the history
  • Loading branch information
pbnj committed Sep 21, 2021
1 parent 12cdd25 commit 7bd3c0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tmux/.tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ bind-key -T copy-mode-vi ] send-keys -X copy-selection

# incremental search like vim
# see: https://github.com/tmux/tmux/issues/895
bind-key -T copy-mode-vi / command-prompt -i -p 'search down' 'send -X search-forward-incremental \"%%%\"'
bind-key -T copy-mode-vi ? command-prompt -i -p 'search up' 'send -X search-backward-incremental \"%%%\"'
# bind-key -T copy-mode-vi / command-prompt -i -p 'search down' 'send -X search-forward-incremental \"%%%\"'
# bind-key -T copy-mode-vi ? command-prompt -i -p 'search up' 'send -X search-backward-incremental \"%%%\"'

bind-key / copy-mode \; send-key / # prefix + / to search down
bind-key ? copy-mode \; send-key ? # prefix + ? to search up

# work project launcher
bind-key C-w run-shell -b 'workdirs="$(find ~/work -type d -execdir test -d {}/.git \; -print -prune | fzf-tmux --multi --bind alt-a:select-all,alt-d:deselect-all)" ; if [ -n "${workdirs}" ]; then for wd in "${workdirs}"; do tmux new-window -c "${wd}" vim . ; done ; fi ;'
bind-key C-w run-shell -b 'workdirs="$(find ~/Projects -type d -execdir test -d {}/.git \; -print -prune | fzf-tmux --multi --bind alt-a:select-all,alt-d:deselect-all)" ; if [ -n "${workdirs}" ]; then for wd in "${workdirs}"; do tmux new-window -c "${wd}" vim . ; done ; fi ;'

# Dotfiles launcher
bind-key C-d new-window -c ~/.dotfiles 'files="$(fzf --multi --preview "cat {}" )" ; if [ -n "${files}" ]; then vim -- ${files} ; fi ;'
Expand Down

0 comments on commit 7bd3c0f

Please sign in to comment.