tmux-plugins / tmux-copycat

A plugin that enhances tmux search
MIT License
1.11k stars 63 forks source link

Improve copycat mode startup time #146

Closed gpanders closed 4 years ago

gpanders commented 5 years ago

Set the copycat mode key bindings once at the very beginning and streamline the process of setting those bindings (use a single pass-through with awk instead of iterating over the list of keybindings every time).

This has a significant impact on the startup time of copycat mode since it does not have to rebind they keys every time copycat mode is started. We can get away with this since all of the copycat scripts check to make sure we are in copycat mode before they do anything, so even if they are executed when not in copycat mode, they are basically a no-op.

bruno- commented 4 years ago

Hi, thanks for this PR. Gimme some time to check code changes.

bruno- commented 4 years ago

Quick update: the PR is looking really good, the difference is noticeable. Also no complaints code-wise, will merge it this week.