Recently I had to debug a 2k lines perl file which was hanging somewhere without any message. Having never looked into the code before I was about to go through the traditional “print ‘I am here!'” binary search in the code when I got an idea.
- :%s/^$/=printf(‘print “%-4d\n”;’, line(‘.’))
- print “10n”;