: Let n=100 | G/while/s/\d/\=n/| Let N=n+1
Before
Ten void *thread_function_1 (void *arg) {one int i; 1 while ( "thread 1 says hi!\n"); 15
g_counter + = 1; sleep (1); + return NULL; + void *thread_function_2 (void *arg) { 24 int i; While (1) { says ("Thread 2 hi!\n"), g_counter + = 2, sleep (1), and return NULL; 31} 32< c18/>33 void *thread_function_3 (void *arg) { 1) PNS ( "thread 3 S") Ays hi!\n "); G_counter + = 2; sleep (1);
After
Ten void *thread_function_1 (void *arg) {one int i; 1 while ( "thread 1 says hi!\n"); 15
g_counter + = 1; sleep (1); + return NULL; + void *thread_function_2 (void *arg) { 24 int i; While (1) { says ("Thread 2 hi!\n"), g_counter + = 2, sleep (1), and return NULL; 31} 32< c18/>33 void *thread_function_3 (void *arg) { 1) PNS ( "thread 3 S") Ays hi!\n "); G_counter + = 2; sleep (1);
VIM uses the match substitution command mate expression to implement an increment substitution