How to make a text file with a pattern of hex numbers in increasing order using VIM? -


how can make text file pattern of hex numbers in increasing order using vim editor? need pattern below:

0000 0001 0002 .... 0008 0009 000a 000b .... 000f 0010 0011 .... ffff 

is possible repeat operation?

one solution create macro. <c-a> increment number under cursor 1. if number starts 0x interpreted a hex number.

from documentation :h ctrl-a

the ctrl-a command useful in macro.  example: use following steps make numbered list.  1. create first list entry, make sure starts number. 2. qa        - start recording register 'a' 3. y         - yank entry 4. p         - put copy of entry below first 1 5. ctrl-a    - increment number 6. q         - stop recording 7. <count>@a - repeat yank, put , increment <count> times 

after words might need remove 0x numbers , make them upper case.


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -