Hi, I installed the fork of easymotion that works in VScode. However, I cannot use this function in Neovim anymore.
EasyMotion: Vim(call):E117: Unknown function: VSCodeSetTextDecorations
Is there way to make it work in both?
You should use upstream version inside Vim and fork inside VSCode.
You should use upstream version inside Vim and fork inside VSCode.
Sorry, could you explain more?
Is it like this in init.vim? :
if exists('g:vscode')
call plug#begin('~/.config/nvim/plugged')
Plug 'https://github.com/asvetliakov/vim-easymotion.git'
call plug#end()
else
call plug#begin('~/.config/nvim/plugged')
Plug 'vim-easymotion/vim-easymotion'
call plug#end()
endif
Yes, exactly. This is the only way.
Two ways actually:
Lazy loading, my preferred way, as you can have both installable at once:
function! Cond(Cond, ...)
let opts = get(a:000, 0, {})
return a:Cond ? opts : extend(opts, { 'on': [], 'for': [] })
endfunction
" inside plug#begin:
Plug 'easymotion/vim-easymotion', Cond(!exists('g:vscode'))
Plug 'asvetliakov/vim-easymotion', Cond(exists('g:vscode'), { 'as': 'vsc-easymotion' })
Branching inside plug, simpler version of your above example, I like this worse because it makes installing confusing:
call plug#begin('/.config/nvim/plugged')
if exists('g:vscode')
Plug 'asvetliakov/vim-easymotion', { 'as': 'vsc-easymotion' }
else
Plug 'vim-easymotion/vim-easymotion'
endif
call plug#end()
Most helpful comment
Two ways actually:
Lazy loading, my preferred way, as you can have both installable at once:
Branching inside plug, simpler version of your above example, I like this worse because it makes installing confusing: