getting selection for search

13 views
Skip to first unread message

M Kelly

unread,
Feb 17, 2020, 10:18:22 PM2/17/20
to tmux-...@googlegroups.com
Hi,

Is there a simple way to get the selected text in copy-mode-vi to use in a search-forward cmd ?
Something like: #{copy-selection}, as in -

bind -T copy-mode-vi '*' if -F "#{selection_present}" 'send -X stop-selection \; send -FX search-forward "#{copy-selection}"' 'send -FX search-forward  "#{copy_cursor_word}"'

thx,
-m

Nicholas Marriott

unread,
Feb 18, 2020, 3:22:26 AM2/18/20
to M Kelly, tmux-users
There is no format for it at the moment, but I don't mind having one,
a bit like copy_cursor_word/line.
> --
> You received this message because you are subscribed to the Google Groups "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/CAD5ox-F5S8N6XtOjB9vYZd25AAhXYv9LX4nn6gNxdW-NwZ5jzw%40mail.gmail.com.

M Kelly

unread,
Feb 18, 2020, 3:26:53 PM2/18/20
to tmux-users
Hi,

ok, I'll look into it soon.
Until then I can use load-buffer and show-buffer as a work-around.

thx,
-m

Reply all
Reply to author
Forward
0 new messages