Fading Issue
When you perform easymotion-sn command, the content of a file will be faded (highlighted as comment), which is desired, and then as you type the keywords to search, the matched charaters will be highlighted to green and bold, which is also desired, my problem is that, at the very begining it works very well, but then later as I re-sourced my vimrc using so % (to make some changes effective), the highlighting (as mentioned before) will totally be disabled, so would you tell me any ways to find exactly what caused this issue? Thanks.
Hmm, I cannot reproduce this. Maybe there are unreloadable lines in your vimrc?
Please make minimal reproduction steps with tiny vimrc.
I'm having this problem too I'll look into it when I get some free time.
It seems to be connected to colour customisations in the vimrc. I even remember looking into the easymotion source when I first stumbled upon this, but I don't remember if I found something :(. The workaround I have been resorting to is to reapply the current colour scheme using the following function (mapped to a command):
function! ResetColors()
if exists("g:colors_name")
execute 'colorscheme '.g:colors_name
endif
endfunction
command! ResetColors call ResetColors()
This solves it every time. Since it only occurs infrequently (mostly -- or only? -- on sourcing vimrc), that was good enough for me. Maybe this helps pinpointing the problem?
I use this workaround:
autocmd BufWritePost * call EasyMotion#highlight#init()
Please make minimal vimrc to solve this without workaround.
I didn't solve it without this workaround.
I didn't solve it without this workaround.
I know. That's because I said please make minimal vimrc to produce this problem
No, what you said is as follows
Please make minimal vimrc to solve this without workaround.
and I can't solve it. The minimal vimrc to produce this problem is an empty vimrc, since this problem comes out of box.
I'll solve it with your vimrc. You don't have to solve it.
The minimal vimrc to produce this problem is an empty vimrc
I guess I hear it first time. Do you report this problem is produced with empty vimrc? And is it really???
Ok, my English is bad.
I want to solve this problem and I need the vimrc to reproduce this problem to solve it.
function! VimEasymotion()
" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
" https://github.com/Lokaltog/vim-easymotion
" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
nmap <leader><leader> <Plug>(easymotion-prefix)
nmap <leader><leader>s <Plug>(easymotion-sn)
nmap <leader><leader>a <Plug>(easymotion-jumptoanywhere)
nmap <leader><leader>f <Plug>(easymotion-bd-f)
nmap <leader><leader>t <Plug>(easymotion-bd-t)
nmap <leader><leader>. <Plug>(easymotion-repeat)
let g:EasyMotion_enter_jump_first = 1
let g:EasyMotion_off_screen_search = 1
let g:EasyMotion_keys = 'abcdefghijklmnopqrstuvwxyz'
autocmd BufWritePost * call EasyMotion#highlight#init()
endfunction
execute VimEasymotion()
well, here's my configuration of easymotion in my vimrc, for your reference. I have this problem with this configuration unless I have this line:
autocmd BufWritePost * call EasyMotion#highlight#init()
easymotion_highlight.vimrc
set nocompatible
set runtimepath+=~/.vim/bundle/vim-easymotion
syntax enable
function! VimEasymotion()
" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
" https://github.com/Lokaltog/vim-easymotion
" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
nmap <leader><leader> <Plug>(easymotion-prefix)
nmap <leader><leader>s <Plug>(easymotion-sn)
nmap <leader><leader>a <Plug>(easymotion-jumptoanywhere)
nmap <leader><leader>f <Plug>(easymotion-bd-f)
nmap <leader><leader>t <Plug>(easymotion-bd-t)
nmap <leader><leader>. <Plug>(easymotion-repeat)
let g:EasyMotion_enter_jump_first = 1
let g:EasyMotion_off_screen_search = 1
let g:EasyMotion_keys = 'abcdefghijklmnopqrstuvwxyz'
" autocmd BufWritePost * call EasyMotion#highlight#init()
endfunction
execute VimEasymotion()
How to (not) reproduce
$ vim -i -N -u easymotion_highlight.vimrc easymotion_highlight.vimrc- Type
<leader><leader>sand confirm the easymotion works. :source %- Type
<leader><leader>s, but I cannot see the reported problem at least in my environment.
Ok, I assume the problem is not your easymotion settings or easymotion itself.
I guess there are some bad lines in your vimrc like autocmd! or something and re-applying colorscheme.
Applying colorscheme disable lots of config for highlight, so highlight related plugins including EasyMotion re-applying color setting with autocmd ColorScheme, but if you somehow disable this autocmd by autocmd! or something, it doesn't work well.