So I wanted to find a way to make vim do a hard line wrap so it would be in nice chunks when I type without having to do hard wrapping myself. Well, here’s how that’s accomplished:
" Set the maximum width of text to 80 characters
set textwidth=80
" Optional: visual indicator for the 80th column
set colorcolumn=80
" formatoptions settings:
" t: Auto-wrap text using textwidth
" c: Auto-wrap comments using textwidth
" q: Allow formatting of comments with "gq"
set formatoptions+=tcq
I allowed AI to generate it for me, let’s face it, I was too lazy to try and google it for myself. AI can be useful for some things I suppose. AI isn’t out for everyone’s job, that’s just a myth. It’s a tool that can be used from time to time to accomplish small tasks.
And for me? This was the perfect task that I needed it to accomplish.
Comments
Post a Comment