Skip to content

faster window switching #16

@m-fonseca

Description

@m-fonseca

Hello,

I noticed tmux switching was slow for me, which ended up the ps command in 'is_vim' was taking close to 400ms to return (theres something going on with my system but it normally returns around 170ms). In the process of figuring out why it was slow, I noticed pgrep is much faster for this (~50ms), and it made a big difference for me. This is not exactly the same as it doesn't look at the ^TXZ states like the other is_vim does, but it seems to be working for me and I figured I'd share.

is_vim="tty=#{pane_tty} ; pgrep -t \${tty#/dev/} 'g?(view|n?vim?x?)(diff)?$' >/dev/null 2>&1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions