Add persistent undo to Neovim

This commit is contained in:
Mikkel Svartveit 2025-05-29 09:34:33 +02:00
parent 052c744d02
commit a2afbde263

View file

@ -10,9 +10,8 @@ let $LANG = 'en_US'
" Disable splash screen " Disable splash screen
set shortmess+=I set shortmess+=I
" Set relative line numbers to make it easier to jump to a line " Enable line numbers
set number set number
set relativenumber
" Always show filename and modified marker in status line " Always show filename and modified marker in status line
set statusline=%f\ %m set statusline=%f\ %m
@ -40,6 +39,10 @@ set breakindent
" Always show 4 lines above and below the cursor " Always show 4 lines above and below the cursor
set scrolloff=4 set scrolloff=4
" Enable persistent undo
set undofile
set undodir=~/.local/share/nvim/undo
" Allow using uppercase W and Q commands to save/quit " Allow using uppercase W and Q commands to save/quit
command WQ wq command WQ wq
command Wq wq command Wq wq