[snip]
> >  " Remove the first column execpt for lines starting with "@0000 "
> >  :v/^...@0000 \+/s/^...@\x\+\ \+//
> >  " Put "@0000" on a separate line
> >  :g/^...@0000/s/ \+/\r/
> >  " Remove three leading zeroes
> >  :v/^...@0000/s/\<000//g
[snip]

Hi again,

How can you combine these three actions into one mapping?
When I do it like this it:

nmap <F3> <esc> <F3>
map <F3>  :v/^...@0000 \+/s/^...@\x\+\ \+//<cr>
" Remove the first column execpt for lines starting with "@0000 "
      \ :g/^...@0000/s/ \+/\r/<cr>
" Put "@0000" on a separate line
      \ :v/^...@0000/s/\<000//g<cr>
" Remove three leading zeroes

then only removes the column and highlights @0000.
It doesn't place a return after the @0000 and it doesn't removes the
leading zeroes.

Example, starting with this:
@0000  00000701 0002E73D 00000700
@0040  000007FE 000301EE 000007FD
@0080  0000077F 000301EE 000007BF
@00C0  00030109 000007AA 0002C7A4

Gives then :
@0000  00000701 0002E73D 00000700
000007FE 000301EE 000007FD
0000077F 000301EE 000007BF
00030109 000007AA 0002C7A4

Or is it better to make this a function and then call this from the F3 mapping?

Rgds,
Jeri

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to