From 23adaca6b2f8a110e6966faff34e9ee8889db03c Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Sat, 4 Nov 2023 13:43:26 +1100 Subject: [PATCH] Make sure +linebreak is available before using it --- dot-config/vim/init.vim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dot-config/vim/init.vim b/dot-config/vim/init.vim index 40341c3..fedf4ab 100644 --- a/dot-config/vim/init.vim +++ b/dot-config/vim/init.vim @@ -39,8 +39,13 @@ silent! packadd! editorconfig set belloff+=ctrlg -set linebreak showbreak=↩ set modelines=5 + +if has('linebreak') + set breakindent breakindentopt=sbr + set linebreak showbreak=↩ +endif + set relativenumber set showcmd @@ -53,9 +58,6 @@ set conceallevel=2 set tabstop=2 shiftwidth=2 -if exists('+breakindent') - set breakindent breakindentopt=sbr -endif for dir_name in ['backup', 'swap', 'undo'] EnsureDir($XDG_STATE_HOME .. '/vim/' .. dir_name) endfor