destaque de pesquisa do modo de cópia tmux

15

Existe alguma maneira de destacar o termo pesquisado no modo de cópia do tmux?

Abaixo está minha configuração do tmux:

# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
bind a send-prefix

# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf

# set window start from 1
set -g base-index 1

# scrollback buffer n lines
set -g history-limit 5000

# C-a C-a for the last active window
bind-key C-a last-window

# Highlight active window
set-window-option -g window-status-current-bg red

# Default colors
set -g status-bg black
set -g status-fg white

#unbind %
bind - split-window -v
#unbind '"'
bind | split-window -h

setw -g aggressive-resize on
bind-key T swap-window -t 1

# To ensure keyboard shortcuts inside Vim still work, we need to enable XTerm keybindings.
# And to be sure Vim's colors aren't distorted, we enable 256 color mode
#setw -g xterm-keys on
#set-option -g default-terminal "screen-256color"


# make copy mode use hjkl
setw -g mode-keys vi # I especially like being able to search with /,? when in copy-mode
set -g status-keys vi
bind-key -t vi-edit Up   history-up
bind-key -t vi-edit Down history-down

# set shell
set -g default-command /bin/bash
set -g default-shell /bin/bash

# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\') || tmux select-pane -l"

#Sets the appearance of the left sidebar
set -g status-left-length 40
set -g status-left "#[fg=colour39]❐ #S #[fg=yellow]✓ #(whoami)"

#Sets the appearance of the center
setw -g window-status-fg colour211
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg white
setw -g window-status-current-bg green
setw -g window-status-current-attr bright
setw -g window-status-activity-bg red
setw -g window-status-activity-fg white
setw -g window-status-bell-fg white
setw -g window-status-bell-bg red
setw -g window-status-bell-attr bold

#Sets the appearance of the right sidebar, i.e time and clock.
set -g status-right "#[fg=colour136, bright]ℹ %d %b %R"
set -g status-utf8 on
set -g status-interval 60
set -g status-justify centre
    
por Browny Lin 08.01.2014 / 06:12

3 respostas

9

Eu encontrei esta informação sobre o destaque da pesquisa do tmux:

According to the developer1, this isn't currently possible in tmux. http://sourceforge.net/mailarchive/message.php?msg_id=27427973

Fonte: Como faço para destacar um resultado de pesquisa no tmux?

    
por 10.01.2014 / 13:09
4

Este recurso parece ter sido adicionado ao tmux versão 2.4 e posterior.

Analisando as notas de lançamento do tmux :

    CHANGES FROM 2.3 TO 2.4, 20 April 2017
     * All occurrences of a search string in copy mode are now highlighted;
       additionally, the number of search results is displayed. The highlighting
       updates interactively with the default emacs key bindings (incremental
       search).
    
por 22.12.2017 / 02:07
2

experimente este plugin tmux-copycat

  • suporte à pesquisa de destaque
  • Prefixo + / entrar rapidamente no modo de pesquisa
  • modo de pesquisa de limpeza automática (na pesquisa F7, a pesquisa da próxima vez manterá a última declaração)
por 25.04.2015 / 13:53

Tags