tech:vim-hex
Différences
Ci-dessous, les différences entre deux révisions de la page.
| tech:vim-hex [2025/03/24 15:06] – créée - modification externe 127.0.0.1 | tech:vim-hex [2025/03/24 19:39] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Vim hex | ||
| + | |||
| + | |||
| + | http:// | ||
| + | |||
| + | |||
| + | |||
| + | Sometimes I find it useful to switch to hex mode when editing a | ||
| + | file in vi. The command for switching is not very obvious so thought I’d | ||
| + | | ||
| + | So, open a file in vi as usual, hit escape and type: | ||
| + | |||
| + | ~~~ | ||
| + | :%!xxd | ||
| + | ~~~ | ||
| + | to switch into hex mode | ||
| + | And when your done hit escape again and type: | ||
| + | |||
| + | ~~~ | ||
| + | :%!xxd -r | ||
| + | ~~~ | ||
| + | to exit from hex mode. | ||
| + | Okay, so this isn’t actaully switching to vi’s ‘hex mode’; vi doesn’t | ||
| + | have one. What the above actually does is to stream vi’s buffer through | ||
| + | the external program '' | ||
| + | |||
