Mercurial > dotfiles
comparison dot_tmux.conf @ 564:b251d808fa04
Add tmux mapping to select the last command output and open selection in quickfix
author | zegervdv <zegervdv@me.com> |
---|---|
date | Sat, 19 Feb 2022 16:38:21 +0100 |
parents | 9af6e508f630 |
children | 697909624a17 |
comparison
equal
deleted
inserted
replaced
563:fb54ab50a72a | 564:b251d808fa04 |
---|---|
149 } | 149 } |
150 | 150 |
151 bind-key -n 'C-q' popup -w50% -h 90% -x 90% -E -d '#{pane_current_path}' chezmoi cd | 151 bind-key -n 'C-q' popup -w50% -h 90% -x 90% -E -d '#{pane_current_path}' chezmoi cd |
152 | 152 |
153 bind-key -n 'C-z' if -F '#{window_zoomed_flag}' "resize-pane -Z" "send-keys C-z" | 153 bind-key -n 'C-z' if -F '#{window_zoomed_flag}' "resize-pane -Z" "send-keys C-z" |
154 | |
155 bind-key -n 'C-s' { | |
156 copy-mode | |
157 send -X clear-selection | |
158 send -X start-of-line | |
159 send -X start-of-line | |
160 send -X cursor-up | |
161 send -X cursor-up | |
162 send -X start-of-line | |
163 send -X start-of-line | |
164 | |
165 if -F "#{m:*->\u00A0*,#{copy_cursor_line}}" { | |
166 send -X search-forward-text "->\u00A0" | |
167 send -X stop-selection | |
168 send -X -N 2 cursor-right | |
169 send -X begin-selection | |
170 send -X end-of-line | |
171 send -X end-of-line | |
172 if "#{m:*->\u00A0?*,#{copy_cursor_line}}" { | |
173 send -X cursor-left | |
174 } | |
175 } { | |
176 send -X end-of-line | |
177 send -X end-of-line | |
178 send -X begin-selection | |
179 send -X search-backward-text "->\u00A0" | |
180 send -X end-of-line | |
181 send -X end-of-line | |
182 send -X cursor-right | |
183 send -X stop-selection | |
184 } | |
185 } | |
186 | |
187 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'" |