Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FZF issue in tmux #881

Closed
6 of 15 tasks
deepredsky opened this issue Mar 22, 2017 · 11 comments
Closed
6 of 15 tasks

FZF issue in tmux #881

deepredsky opened this issue Mar 22, 2017 · 11 comments

Comments

@deepredsky
Copy link

deepredsky commented Mar 22, 2017

  • Category
    • fzf binary
    • fzf-tmux script
    • Key bindings
    • Completion
    • Vim
    • Neovim
    • Etc.
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Windows Subsystem for Linux
    • Etc.
  • Shell
    • bash
    • zsh
    • fish

The first item in the result is prefixed by some weird characters

?Ptmux;??]1337;CursorShape=0??\

fzf version 0.16.6
tmux 2.3

This only happens in tmux. I have tried both fzf and fzf-tmux commands

@junegunn
Copy link
Owner

I'm not familiar with that CursorShape=0. Is it from your configuration?
Also, what is the value of $TERM? Does it start with screen-?

@deepredsky
Copy link
Author

Dunno where the CursorShape is coming from. i also tried with clean install of tmux with no custom config but got same result

echo $TERM
screen-256color

@junegunn
Copy link
Owner

junegunn commented Mar 24, 2017

This looks related: https://www.iterm2.com/documentation-escape-codes.html
Any idea?

@deepredsky
Copy link
Author

I looked into this issue a bit more and i m convinced this is not related to fzf but its due to iTerm setting up CursorShape when starting the tmux server. If I start a clean tmux session from another emulator like terminal or alacrity the issue does not appear (which i can use as as workaround as well). The escape codes link is probably a clue to fix it but not something i was able to do. Thank for looking into this issue though.

@junegunn
Copy link
Owner

I use iterm2 but I don't have the issue. Please let me know if you find out more about the issue, thanks.

@blaxill
Copy link

blaxill commented Jul 25, 2017

I had this issue when using the fish shell, and it could be an issue with how the fish shell sets the cursor shape for different vi modes. As a workaround, you can disable different cursor displays for different vi modes in the fish shell by adding the following to your ~/.config/fish/config.fish file:

function fish_vi_cursor; end

and/or

function __fish_cursor_1337; end

@kozie
Copy link

kozie commented Jul 28, 2017

I'm having similar issues where i can not seem to use :GFiles in a tmux environment using fish shell.

I tried the above but adding the fish_vi_cursor function doesn't seem to do anything and adding __fish_cursor_1337 breaks my tmux by not starting a shell anymore within tmux. I tried adding them both and individually.

The only solution that seems to work good enough for me is using term xterm-256color within tmux instead of screen-256color but i'm pretty convinced that there is a better solution :)

@deanashton
Copy link

@kozie placing it before fish_vi_key_bindings in ~/.config/fish/config.fish fixed it for me:

function fish_vi_cursor; end
fish_vi_key_bindings

@kozie
Copy link

kozie commented Jul 28, 2017

Holy nuts.. I did that while also setting the tmux term back to screen-256color and it seems to work! :) Thanks a bunch!

@deepredsky
Copy link
Author

perfect! placing it before invoking the vi bindings in fish config fixed it for me as well. Thanks @blaxill and @deanashton

@1ak31sha
Copy link

1ak31sha commented Sep 6, 2018

thank you @deanashton ! i had same issue but when using prettier in nvim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants