# HG changeset patch # User zegervdv # Date 1645285101 -3600 # Node ID b251d808fa04985a5e91c8db7f7741f4f17c222c # Parent fb54ab50a72a232cc7a110ce6f489df57f0fd548 Add tmux mapping to select the last command output and open selection in quickfix diff -r fb54ab50a72a -r b251d808fa04 dot_tmux.conf --- a/dot_tmux.conf Thu Feb 17 11:28:41 2022 +0100 +++ b/dot_tmux.conf Sat Feb 19 16:38:21 2022 +0100 @@ -151,3 +151,37 @@ bind-key -n 'C-q' popup -w50% -h 90% -x 90% -E -d '#{pane_current_path}' chezmoi cd bind-key -n 'C-z' if -F '#{window_zoomed_flag}' "resize-pane -Z" "send-keys C-z" + +bind-key -n 'C-s' { + copy-mode + send -X clear-selection + send -X start-of-line + send -X start-of-line + send -X cursor-up + send -X cursor-up + send -X start-of-line + send -X start-of-line + + if -F "#{m:*->\u00A0*,#{copy_cursor_line}}" { + send -X search-forward-text "->\u00A0" + send -X stop-selection + send -X -N 2 cursor-right + send -X begin-selection + send -X end-of-line + send -X end-of-line + if "#{m:*->\u00A0?*,#{copy_cursor_line}}" { + send -X cursor-left + } + } { + send -X end-of-line + send -X end-of-line + send -X begin-selection + send -X search-backward-text "->\u00A0" + send -X end-of-line + send -X end-of-line + send -X cursor-right + send -X stop-selection + } +} + +bind-key -T copy-mode-vi 'e' send -X copy-pipe-and-cancel "cat > /tmp/error.txt && tmux new-window -n 'quickfix' -c \"#{pane_current_path}\" 'nvim -q /tmp/error.txt && rm -f /tmp/error.txt'" diff -r fb54ab50a72a -r b251d808fa04 dot_zshrc --- a/dot_zshrc Thu Feb 17 11:28:41 2022 +0100 +++ b/dot_zshrc Sat Feb 19 16:38:21 2022 +0100 @@ -6,8 +6,8 @@ export LC_ALL=$LANG -PROMPT='%F{cyan}%T%f %F{red}%m%f %F{blue}%~%b%f -%j -> ' +PROMPT=$'%F{cyan}%T%f %F{red}%m%f %F{blue}%~%b%f +%j ->\u00A0' vim_ins_mode="%F{black}%K{yellow} INS %k%f"