Skip to content

Instantly share code, notes, and snippets.

@Osse
Created April 19, 2012 05:03
Show Gist options
  • Save Osse/2418691 to your computer and use it in GitHub Desktop.
Save Osse/2418691 to your computer and use it in GitHub Desktop.
Hex toggling function
fun ToggleHex()
if (!exists("b:is_hex"))
let b:is_hex = 1
endif
if b:is_hex
exe '%!xxd -r'
let b:is_hex = 0
else
exe '%!xxd'
let b:is_hex = 1
endif
endfun
nnoremap <Leader>h :call Togglehex()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment