Skip to main content

Hex in vim

Posted in

map <F4> :execute HexView()<CR>
 
let s:hflag=0
function! HexView()
    if s:hflag == 0
        let s:hflag=1
        return ":%!xxd"
    else
        let s:hflag=0
        return ":%!xxd -r"
    endif
endfunction

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
 `OooOOo.    .oOOOo.    o                    o       O 
o `o .O o O O o
O O o O `o O'
o .O O o O o
OOooOO' O .oOOo OoOo. .oOoO `o O `O'
o o o. O O o o O O o o
O O O. oO o O O o o O O
O o `OooO' `OoO' `OoOo `o' O
O
OoO'
Enter the code depicted in ASCII art style.