Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't find init.vim

Tags:

neovim

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.

like image 619
Bigbadboybob Avatar asked Dec 31 '16 16:12

Bigbadboybob


People also ask

Where is my init vim?

Editing the config file For macOS and Linux, the Neovim config file is located in ~/. config/nvim/init. vim .

Where is my NVIM config file?

Nvim's user-specific configuration file is located at $XDG_CONFIG_HOME/nvim/init. vim , by default ~/. config/nvim/init.

Is init vim the same as vimrc?

config/nvim/init. vim is the real file used as conf. ~/. vim/vimrc is just a link to it.

Where is vimrc in neovim?

~/. vimrc is the default configuration file for vim. For neovim, simply copy the file to ~/. config/nvim/init.


4 Answers

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-configuration from your neovim instance.

like image 72
kokito Avatar answered Oct 02 '22 13:10

kokito


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.

like image 34
israteneda Avatar answered Oct 02 '22 11:10

israteneda


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.

like image 25
Daniel Kim Avatar answered Oct 02 '22 12:10

Daniel Kim


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
like image 31
proximab Avatar answered Oct 02 '22 13:10

proximab