V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
aloxaf
V2EX  ›  Linux

使用 tmux popup + fzf-tab 实现 zsh 悬浮补全菜单

  •  
  •   aloxaf ·
    Aloxaf · Oct 25, 2020 · 4401 views
    This topic created in 2021 days ago, the information mentioned may be changed or developed.

    asciicast

    前几天在 tg vim 群聊天时想到的想法,试着实现了一下,效果喜人。

    解决了我的一大痛点——在补全菜单过长的时候,prompt 会被顶到最顶上去,导致我必须要滚到上面才能看到前面的内容。现在有了 popup,补全菜单完全不会干扰 prompt 了。

    tmux 实在太棒了!

    项目地址: https://github.com/Aloxaf/fzf-tab

    注 1:默认使用原版 fzf,需要使用以下命令启用 tmux popup 支持

    zstyle ':fzf-tab:*' fzf-command ftb-tmux-popup
    

    注 2:需求 tmux >= 3.2

    4 replies    2020-10-26 09:06:55 +08:00
    secondwtq
        1
    secondwtq  
       Oct 25, 2020
    挺酷的。

    一看帖子,这动机有点奇怪,一般补全列表过长我都直接放弃补全的 …
    aloxaf
        2
    aloxaf  
    OP
       Oct 26, 2020
    @secondwtq 我主要是习惯拿补全当文件 /参数查看器用……

    不过 fzf-tab 默认情况下也限制了补全菜单最长为当前窗口的一半,影响也不是很大。
    其实还有一个好处忘记写上去了——在分屏的情况下,补全菜单不会被强行截断到当前 pane 的大小。
    FurN1
        3
    FurN1  
       Oct 26, 2020
    酷炫
    zh5e
        4
    zh5e  
       Oct 26, 2020
    真香
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   930 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 21:52 · PVG 05:52 · LAX 14:52 · JFK 17:52
    ♥ Do have faith in what you're doing.