tags:

views:

34

answers:

1

Hello All

BeyondCompare has this conversion feature which can run an external program on certain file type and open the file generated. For eg. If a file has format *.abc which is a binary file and if i have an external program which reads this binary and convert it to text with a different extension like *.xyz, i can associate beyondcompare to compare *.xyz(text) though i open *.abc(binary) files.

I wanted to know if there's such text editor available. When i open a *.abc(binary) file, the editor should run the external program to convert *.abc to *.xyz(txt) and open *.xyz instead. Tried searching for this in net but no leads there.

Thx

A: 

vim can do this. In your vimrc resource file:

:au BufRead *.foo :!sed 's/a/o/g' % > %:r.bar
:au BufRead *.foo :edit %:r.bar
Ignacio Vazquez-Abrams