Just need some modifications and we are good to go for using old vimrc for NeoVim.
Preface
Lately, I am trying to use NeoVim instead of Vim.
Yet, I am too lazy to write a new config for NeoVim, just want to use the vimrc
I am using.
I've been using Vundle as my Vim plugin manager for a long time and I want to use it as my NeoVim plugin manager as well.
Note
NeoVim use ~/.config/nvim/init.vim
as user config file.
Add soft link so we can make Vim and NeoVim share the same config file.
mkdir -p ~/.config/nvim
ln -s ~/.vimrc ~/.config/nvim/init.vim
Some modifications for vimrc
- Add these lines at first of
vimrc
for Vundle to use different dir for Vim and NeoVim.
if has('nvim')
let s:editor_root=expand("~/.config/nvim")
set rtp+=~/.config/nvim/bundle/Vundle.vim
else
let s:editor_root=expand("~/.vim")
set rtp+=~/.vim/bundle/Vundle.vim
endif
- Add this line before
call vundle#begin()
invimrc
to make Vundle use different dir for Vim and NeoVim.
call vundle#rc(s:editor_root . '/bundle')
That's it.
References
Share
Donation
如果覺得這篇文章對你有幫助, 除了留言讓我知道外, 或許也可以考慮請我喝杯咖啡, 不論金額多寡我都會非常感激且能鼓勵我繼續寫出對你有幫助的文章。
If this blog post happens to be helpful to you, besides of leaving a reply, you may consider buy me a cup of coffee to support me. It would help me write more articles helpful to you in the future and I would really appreciate it.
Related Posts
- Y2017W18
- Y2016W45
- Y2016W47
- The ycmd server SHUT DOWN (restart with ':YcmRestartServer')
- Wrong % (matching parens searching) action in Vim