"============================================================================= " Copyright: Copyright (C) 2003 Peter Franz " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, " hexman.vim is provided *as is* and comes with no " warranty of any kind, either expressed or implied. In no " event will the copyright holder be liable for any damamges " resulting from the use of this software. " Name Of File: hexman.vim " Description: HexManger: Simpler Hex viewing and editing - Vim Plugin " " Hexmanger provides keymapping to view quickly your file " in hexmode (convertion is done over the program xxd). " " Additional features: " - shows in statusline the current offset (hex and dec.) " - move to next/previous hex character with and " If you don't like this mapping - please set in your vimrc: " let hex_movetab = 0 " - staying on a hex character it marks the related ascii column " - Goto hex offset " - Delete hex character under cursor " - Insert ascii character before cursor " - Show own hexman menu entry with hexman commands (gui version). " If you don't like the menu - please set in your vimrc: " let hex_menu = 0 " " Maintainer: Peter Franz (Peter.Franz.muc@web.de) " URL: http://vim.sourceforge.net/scripts/... " Last Change: Mi 30.07.2003 " Version: 0.1.0 " Usage: Normally, this file should reside in the plugins " directory and be automatically sourced. If not, you must " manually source this file using ':source hexman.vim'. " " If you want to edit a file in hexmode, start vim " with the -b option - like: " vim -b " and then switch to hexmode with hm " (see Available functions). " The program xxd is needed to convert the file in hex (and " back). " Only changes in the hex part are used. " Changes in the printable text part on the right are ignored. " " Additional help: " :help *23.4* " :help xxd " " History: 0.1.0 Show own hexman menu entry with hexman commands (gui version). " 0.0.2 FIX: default moving to next hex character " with and don't work on (LINUX/UNIX) " (see Additional Features). " 0.0.1 Initial Release " Some Functions are derived from Robert Roberts " byteme.vim version 0.0.2 " The original plugin can be found at: " http://www.vim.org/scripts/script.php?script_id=268 " Thank you very much! " "============================================================================= " " Available functions: " " hm HexManager: Call/Leave Hexmode (using xxd) " hd HexDelete: delete hex character under cursor " hi HexInsert: Insert Ascii character before cursor " hg HexGoto: Goto hex offset. " hn HexNext: Goto next hex offset. " hp HexPrev: Goto previous hex offset. " hs HexStatus: Show / Hide hexoffset infos in statusline " and related ascii colum " " If you want, you can change the mapping in your vimrc: " Example (call with function key F6 the Hexmode: " map HexManager " " Additional Features in HexManger: " - show in statusline the current offset (hex and dec.) " - moving to next hex character with and " If you don't like this mapping - please set in your vimrc: " let hex_movetab = 0 " - staying on a hex character it marks the related ascii column " If something is wrong (I think there is) or we can do " something better - please let me know... " "============================================================================= " " Define mapping: " if !hasmapto('HexManager') map hm HexManager endif if !hasmapto('HexDelete') map hd HexDelete endif if !hasmapto('HexInsert') map hi HexInsert endif if !hasmapto('HexGoto') map hg HexGoto endif if !hasmapto('HexNext') map hn HexNext endif if !hasmapto('HexPrev') map hp HexPrev endif if !hasmapto('HexStatus') map hs HexStatus endif noremap