9

I just started with this from neovim and ubuntu and I don't know why when I install neovim it is not in .config, putting the command which nvim in the terminal tells me that it is in / usr / bin / nvim and to put the configuration I need it to be in .config Thanks

PACO PEPE
  • 91
  • 1
  • 1
  • 2

2 Answers2

5

General answer

As @iokanuon mentioned, neovim (and many other applications) doesn't touch your ~/.config/ directory per default. You just need to create the nvim directory with

mkdir -p ~/.config/nvim

and create the ~/.config/nvim/init.vim file like that:

echo "echo 'Created init.vim successfully!'" > ~/.config/nvim/init.vim

(or just simply touch ~/.config/nvim/init.vim).

vim-plug

You can give vim-plug the path where you want to store the plugins as mentioned in the README.md file:

" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" ...
call plug#end()

So in this case, all plugins are stored in the ~/.vim/plugged directory. You can adapt it to your needs!

TornaxO7
  • 1,150
  • 9
  • 24
3

If you install nvim via your package manager, the nvim executable file will be placed in somewhere like /usr/bin/nvim or /usr/local/bin/nvim based on your system.

The nvim configuration file is named init.vim, and it should be put under directory $HOME/.config/nvim/. If this directory does not exist, just create it yourself.

mkdir $HOME/.config/nvim
mv init.vim $HOME/.config/nvim
Inanc Gumus
  • 25,195
  • 9
  • 85
  • 101
jdhao
  • 24,001
  • 18
  • 134
  • 273