The contents of my commented init.vim are of interest to no one but me. Just need a convenient place for this info. This might help you learn where to put your init.vim, though.
- For installation instructions, see Installing on Ubuntu 18.04
Neovim is pretty much compatible with Vim. Vim looks for the configuration file
.vimrc
in a special location on startup. Neovim looks for init.vim
.
Neovim puts its MacOS .vimrc
equivalent in $HOME/.config/nvim/init.vim
So, on a new MacOS install, you'd do this to configure the Neovim init.vim file:
# Create the directory
mkdir -p $HOME/.config/nvim/
# Edit or create the file
nvim $HOME/.config/nvim/init.vim
Neovim puts its Windows .vimrc
equivalent in %LOCALAPPDATA%\nvim
The nvim version of .vimrc is named init.vim and goes in this directory: mkdir %LOCALAPPDATA%\nvim
So, on a new Windows install, you'd do this to configure the Neovim init.vim file:
C:\> nvim %LOCALAPPDATA%\nvim\init.vim
" Make sure you have this in init.vim, then paste using Shift+Insert
" Paste with <Shift> + <Insert>
imap <S-Insert> <C-R>
I know you'd never do anything this sloppy or lazy, but I would. You can download
init.vim
straight from this repo as shown using curl:
# -L means follow redirects
# -O means use only the base filename, strip off the rest of the pathname
curl -L -O https://raw.github.com/tomcam/neovim/master/init.vim
You can do the same with wget:
wget https://raw.github.com/tomcam/neovim/master/init.vim --output-document ~/.config/init.vim
The Vim configuration file .vimrc
lives in ~/.vimrc
. To edit:
vim ~/.vimrc
The Vim configuration file .vimrc
lives in vim %HOMEDRIVE%%HOMEPATH%\.vimrc
:
vim %HOMEDRIVE%%HOMEPATH%\.vimrc
: Change to the home directory, where
: Vim expects to find the .vimrc config file.
cd %HOMEDRIVE%%HOMEPATH%
: Copy an example Neovim file to the current directory
: (this one is compatible with Vim)
curl -L -O https://raw.github.com/tomcam/neovim/master/init.vim
: Rename the Neovim config file to Vim's config file name.
ren init.vim .vimrc
You can use this config file with Vim, which expects it
# Copy the init.vim file from GitHub to
# a file named ~/.vimrc.
wget https://raw.github.com/tomcam/neovim/master/init.vim --output-document ~/.vimrc