junegunn / fzf.vim

fzf :heart: vim
MIT License
9.59k stars 582 forks source link

Disable unicode for windows #1375

Open iaalm opened 2 years ago

iaalm commented 2 years ago

Hi, I use fzf.vim on Windows with ambiwidth=single. When I run any long operations like "Rg", my vim keeps bell and there's no way to disable it from vim side. It's quite annoying. It also doesn't matter whether I use cmd or powershell. I find it related to this issue because I don't see the spinner characters. Instead I see characters like "&" or "8" and the bell has same rhythm with the chars.

Screenshot

My suggestion is to add "--no-unicode" to all windows machine. Or maybe we can add a flag to disable spinner chars only? Tested on Windows 11, gVim 8.2.

junegunn commented 2 years ago

I'm not really a Windows user, so it's hard to tell if it's the right call to disable it altogether. Some systems are capable of properly rendering the spinner (see https://github.com/junegunn/fzf/issues/2631).

I'd suggest that you set it in your $FZF_DEFAULT_OPTS for the moment until we find a better way.

" In your vimrc
if has('win32') || has('win64')
  let $FZF_DEFAULT_OPTS = '--no-unicode'
endif