Say I have a super long line in the VIM editor (say around 300+ characters). How would I break that up into multiple lines so that the word boundaries roughly break at 80 chara
For solid lines of text highlight the area using v in normal mode, then press
:s/\v(.{80})/\1\r/g
This will add a newline at the end of every 80th character.
:s/ replaces within the current select
\v uses regular expressions
(.{80}) selects 80 characters & placed them into group one
\1\r replaces group one with group one and a newline