On Wed, Jul 4, 2012 at 3:19 AM, John Beckett johnb.beck...@gmail.com
wrote:
Write a binary file (no newline at end) of characters translated
from pairs of hex ASCII characters (no spaces) on current line.
function! WriteChars(outfile, text)
let chars = ''
for i in range(0,
On Wed, Jul 04, 2012 at 12:18:48AM EDT, William Fugh wrote:
-Vim 7.3 + Vista(SP2)
If there are 8 chars in one line like this:
52494646
Question: using Vim command line(s), how to write a binary file, and make
it 'RIFF' (4 char, not '52494646') in a viewer of TXT?
Just to illustrate:
let l1
William Fugh wrote:
If there are 8 chars in one line like this:
52494646
Question: using Vim command line(s), how to write a binary
file, and make it 'RIFF' (4 char, not '52494646') in a viewer of TXT?
Write a binary file (no newline at end) of characters translated
from pairs of hex ASCII
[...]
function! WriteChars(outfile, text)
let chars = ''
for i in range(0, len(a:text)-1, 2)
let chars .= nr2char('0x'.a:text[i : i+1])
endfor
call writefile([chars], a:outfile, 'b')
endfunction
command! WriteChars call WriteChars('data.bin', getline('.'))
Good one. that's
Hi guys,
-Vim 7.3 + Vista(SP2)
If there are 8 chars in one line like this:
52494646
Question: using Vim command line(s), how to write a binary file, and make
it 'RIFF' (4 char, not '52494646') in a viewer of TXT?
BRs,
--
William
--
You received this message from the vim_use