Notepad++/Vim Incremental Insert -


i have file i'm writing need insert incrementing numbers in 2 different places (context & uconfig). i've tried using column editor in notepad++, adds numbers in middle of other rows.

forw mte context 0   forw mte config 1 0 0   forw mte cellselection 10000  [10]   forw mte uconfig 1([100000000000000 2] [] [] []) [] [0]   forw mte configcapability [1] [100] [100]   forw mte configselection 20000 

i need copy selection 1000 times context going 0-999 , uconfig going 100000000000000-100000000000999.

it should easy task vim:

type:

qq?conte<cr>6yggpn<c-a>3jf0<c-a>q 

then 998@q

  • first step record macro <cr> , <c-a> means pressing enter , ctrl-a
  • 2nd step replay macro 998 times
  • "what first line exactly"? try first ? till last <c-a> see how text modified

following demo, show add text 0 - 4 (after recording, press 3@q):

enter image description here


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -