Can't find init.vim

113.8k views Asked by At

I can't seem to find my init.vim. I believe it is supposed to be under ~/Neovim/share/nvim but the only folder there is runtime. Do I have to make a file called init.vim? If so, where do I put it?

If anyone is still reading this, I have not fixed the problem. I have found where init.vim should be but it is not there and when I try to create the file I cannot write it when I save it. Even when I do it as administrator, I cannot write the file.

7

There are 7 answers

8
kokito On BEST ANSWER

the config file for neovim is at ~/.config/nvim/init.vim. or if set $XDG_CONFIG_HOME/nvim/init.vim. you can get more info with :help nvim-config from your neovim instance.

0
FurryDestroyer69 On

To find and edit your init.vim, do the following in sequence (assuming you use a Unix-based terminal):

~ cd /root/.config/nvim
~ nvim init.vim

This worked for me using Windows and running on the Ubuntu terminal, should work for other distributions too.

3
Daniel Kim On

For Windows 10, the neovim's init.vim file is located in %userprofile%\AppData\Local\nvim\init.vim. Typically, it would be located in : C:\Users\USERNAME\AppData\Local\nvim\init.vim. Change USERNAME with your username.

0
Martin On

from within neovim do

:echo $MYVIMRC

to display the full path to the currently used init.vim file

2
israteneda On

I couldn't find init.vim at ~/.config/nvim/init.vim in Ubuntu 18.04. I installed neovim with neovim instructions:

Since 18.04 As in Debian, neovim is in Ubuntu.

sudo apt install neovim

Python (:python) support seems to be automatically installed

sudo apt install python-neovim
sudo apt install python3-neovim

So instead, I use vim-bootstrap to create the config file and put in neovim configuration:

mkdir ~/.config/nvim & cp ~/Downloads/generate.vim ~/.config/nvim/init.vim 

PD: I am using zsh shell and I have vim installed.

0
proximab On

On ubuntu, I created on my own a directory /.config/nvim and init.vim configuration file and that worked.

mkdir ~/.config/nvim
nvim ~/.config/nvim/init.vim
1
J. Doe On

For Windows, init.vim was located in Neovim\share\nvim\runtime\plugin