Title here
Summary here
The init.vim
file is the configuration file for Neovim, similar to Vim’s .vimrc
. This guide will assist you in setting up your init.vim
on a macOS system.
:help init.vim
and press Enter
. This section provides detailed information about the init.vim
file’s purpose and typical usage.~/.config/nvim/
. If this directory does not exist, you need to create it:mkdir -p ~/.config/nvim/
init.vim
file already exists:ls -la ~/.config/nvim/ | grep init.vim
init.vim
file does not exist, create it:touch ~/.config/nvim/init.vim
init.vim
file in Neovim:nvim ~/.config/nvim/init.vim
set number " Enable line numbers
set relativenumber " Enable relative line numbers
set noerrorbells " Turn off error bells
set tabstop=4 " Number of spaces tabs count for
Esc
, then type :wq
and press Enter
.After setting up your init.vim
, restart Neovim to ensure all configurations are loaded correctly. Type :echo "Configuration successful"
in Neovim to test if the script is running without errors.