I’m using a Sed script to view only lines less then or longer then .. characters.
That script doesn’t work with both together (when I want to view lines less then p.e. 80 characters and longer then 70 characters).
Does anyone know if there is a simple solution in Vim to view only these lines and empty out (not delete) all other lines
p.e.
a) view only lines less then 75 characters
b) view only lines longer then 80 characters
b) view only lines less then 75 characters and longer then 65 characters
You can use
vimgrepcommand:It will extract lines which contain
65~75characters in current file.Update:
You can use this command to empty unmatched lines:
It’ll empty lines which contains
0~64or76~+∞characters.