From 2384135982f3629e76573773e32a7a57a6cbca4c Mon Sep 17 00:00:00 2001 From: srdusr Date: Fri, 11 Aug 2023 22:37:56 +0200 Subject: Fixed weird formatting/wrapping --- autoload/utils.vim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'autoload') diff --git a/autoload/utils.vim b/autoload/utils.vim index 1ca005f..fc078f7 100644 --- a/autoload/utils.vim +++ b/autoload/utils.vim @@ -147,4 +147,20 @@ function! utils#GotoJump() endfunction +"------------------------------------------------- + +" Disable annoying auto line break +fu! utils#DisableBr() + set wrap + set linebreak + set nolist " list disables linebreak + set textwidth=0 + set wrapmargin=0 + set formatoptions-=t +endfu + +" Disable line breaks for all file types +autocmd! BufNewFile,BufRead *.* call utils#DisableBr() + + "------------------------------------------------- -- cgit v1.2.3