Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For my understanding (ignoring the loop):

    between mark a and mark b: 'a,'b
    goto lines containing Abc: g/Abc
    recognizable substitute:   s/yy/\=i/
      = prefixes a variable (escaped with \)
A problem is that it will only replace the first `yy` on the line (if you add g, to make it s/yy/\=i/g, it replaces all of them, but with the same value of i.

How to make it increment multiple yy's on the one line?



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: