VIM editor – delete lines longer than 50 charenters

 

You want to remove long lines, but not touch shorter lines.

Example: For each line longer than 50 chars,


:g/.\{50,\}/d

 

 

also

:g/^.\{,39\}$/d

and

:g/\(^.\{,39\}$\)\|\(^.\{61,\}$\)/d

should work.