Search code examples
vi

How to use VI to search for lines less than a certain length?


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?


Solution

  • Use

    /^.\{,25}$/
    

    to find lines shorter than 25 characters.