unblevable / quick-scope

Lightning fast left-right movement in Vim
MIT License
1.43k stars 54 forks source link

This plugin breaks in neovim when neovim's true color support enabled #32

Closed wyntau closed 6 years ago

wyntau commented 8 years ago

my config is below.

Plug 'unblevable/quick-scope'
  let g:qs_enable = 0
  " Map the leader key + q to toggle quick-scope's highlighting in normal/visual mode.
  " Note that you must use nmap/vmap instead of their non-recursive versions (nnoremap/vnoremap).
  nmap <leader>q <plug>(QuickScopeToggle)
  vmap <leader>q <plug>(QuickScopeToggle)

When I use in neovim without true color support, it works fine. If I enable neovim's true color, I use QuickScopeToggle, but there's no symbol highlighted at all.

MITHX commented 8 years ago

In quick_scope.vim under

" Colors " Detect if the running instance of Vim acts as a GUI or terminal. function! s:get_term() if has('gui_running') || (has('nvim') && $NVIM_TUI_ENABLE_TRUE_COLOR) let term = 'gui' else let term ='cterm' endif

I changed

if has('gui_running') || (has('nvim') && $NVIM_TUI_ENABLE_TRUE_COLOR) to if has('gui_running') || (has('nvim') && $NVIM_TUI_ENABLE_TRUE_COLOR) || (has('termguicolors'))

It seems to work for me now. The newest version of neovim I dont think uses $NVIM_TUI_ENABLE_TRUE_COLOR anymore. Instead put, set termguicolors in your init.vim file. https://github.com/neovim/neovim/wiki/Following-HEAD#20160511

gabrielflorit commented 8 years ago

This worked for me, thank you! BTW I'm on neovim 0.1.5.