How To Enable Relative Line Numbers in Vim or Neovim
TLDR: For Vim, to enable relative line numbers, edit your .vimrc file. Usually located in ~/.vimrc add the following to the config file: set relativenumber For Neovim, edit the init.lua file, usually at ~/.config/nvim/init.lua add the following lines: vim.wo.relativenumber = true The next time you reopen Vim or Neovim with the configuration added, you should see relative line numbers enabled. Understanding Line Numbers in Vim or Neovim When using Vim or Neovim, the most common way to display line numbers for files being edited or viewed is to use Normal Line Numbers or Relative Line Numbers. ...