I know how to use VI to find lines longer than a certain number of characters:
/\%>80v.\+
But how do I search for lines shorter than a certain number of characters?
To move left, press h . To move right, press l . To move down, press j . To move up, press k .
Press l to move the cursor right and j to move the cursor down to get the cursor to the S. Then press i to "insert" and hit enter to create a new line.
Press 0 to go to the beginning of a line, or ^ to go to the first non-blank character in a line.
Use
/^.\{,25}$/
to find lines shorter than 25 characters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With