Fzf: support true color

Created on 5 Jan 2017  路  7Comments  路  Source: junegunn/fzf

  • Category

    • [x] fzf binary

    • [ ] fzf-tmux script

    • [ ] Key bindings

    • [ ] Completion

    • [x] Vim

    • [x] Neovim

    • [ ] Etc.

  • OS

    • [x] Linux

    • [x] Mac OS X

    • [x] Windows

    • [x] Windows Subsystem for Linux

    • [x] Etc.

  • Shell

    • [x] bash

    • [x] zsh

    • [x] fish

Would allow fzf.vim to properly display gui vim colorschemes.

feature

Most helpful comment

Yep. Colors are customizable via --color.

fzf --color 'fg:#839496,fg+:#93a1a1,bg:#002b36,bg+:#073642' --height 50%

All 7 comments

This won't happen soon as ncurses does not support true colors. However, once #782 is merged, and the new renderer (which happens to support true colors) turns out to be stable and performant, we can consider replacing ncurses completely.

Experimental support for 24-bit colors in --color option is in https://github.com/junegunn/fzf/commit/ae274158de38181bca27f2ce54c8b4fc0b688eff. However, I'm running into https://github.com/neovim/neovim/issues/4151 when trying to start fzf with --height option within Neovim terminal. So I can't make Neovim plugin use the option at the moment.

So should this just work? Or is there something that needs to be done to enable true color for fzf? Because for me the colors look a bit off, even though I'm using true color.

  1. Set up your vim or neovim to use true colors (set termguicolors).
  2. Define g:fzf_colors to tell fzf to extract colors from the current color scheme. See https://github.com/junegunn/fzf/wiki/Configuring-Vim-plugin for an example

Related: https://github.com/junegunn/fzf/issues/818

Sorry, didn't mean in vim. What I meant is if I'm running a terminal emulator that supports true color and has it enabled correctly, will fzf automatically run in true color as well (in the terminal, not vim), or do I need to do anything extra to enable it for fzf?

But that might be a stupid question.

Yep. Colors are customizable via --color.

fzf --color 'fg:#839496,fg+:#93a1a1,bg:#002b36,bg+:#073642' --height 50%

Cool, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jberglinds picture jberglinds  路  3Comments

fenuks picture fenuks  路  3Comments

ahmedelgabri picture ahmedelgabri  路  3Comments

skamsie picture skamsie  路  3Comments

lbeier picture lbeier  路  3Comments