Just need some modifications and we are good to go for using old vimrc for NeoVim.


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.


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
    let s:editor_root=expand("~/.vim")
    set rtp+=~/.vim/bundle/Vundle.vim
  • Add this line before call vundle#begin() in vimrc to make Vundle use different dir for Vim and NeoVim.
call vundle#rc(s:editor_root . '/bundle')

That's it.




如果覺得這篇文章對你有幫助, 除了留言讓我知道外, 或許也可以考慮請我喝杯咖啡, 不論金額多寡我都會非常感激且能鼓勵我繼續寫出對你有幫助的文章。

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