<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for linux instead</title>
	<atom:link href="http://www.linuxinstead.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linuxinstead.com/blog</link>
	<description>Kevs IT related ramblings</description>
	<lastBuildDate>Thu, 10 May 2012 07:59:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>Comment on Using vi as a hex editor by Tribio</title>
		<link>http://www.linuxinstead.com/blog/2009/04/21/using-vi-as-a-hex-editor/comment-page-1/#comment-6448</link>
		<dc:creator>Tribio</dc:creator>
		<pubDate>Thu, 10 May 2012 07:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxinstead.com/blog/?p=126#comment-6448</guid>
		<description>Thank you very much for this hint!
I use GVim, and the command works like a charm!</description>
		<content:encoded><![CDATA[<p>Thank you very much for this hint!<br />
I use GVim, and the command works like a charm!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using vi as a hex editor by Joe</title>
		<link>http://www.linuxinstead.com/blog/2009/04/21/using-vi-as-a-hex-editor/comment-page-1/#comment-6446</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Thu, 19 Apr 2012 14:29:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxinstead.com/blog/?p=126#comment-6446</guid>
		<description>Thanks a lot for the info and the corrections guys.  I love Linux, but even after many years of use there are still new useful commands/features I find.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for the info and the corrections guys.  I love Linux, but even after many years of use there are still new useful commands/features I find.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using vi as a hex editor by Janos</title>
		<link>http://www.linuxinstead.com/blog/2009/04/21/using-vi-as-a-hex-editor/comment-page-1/#comment-6445</link>
		<dc:creator>Janos</dc:creator>
		<pubDate>Sat, 14 Apr 2012 09:04:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxinstead.com/blog/?p=126#comment-6445</guid>
		<description>It gets better. Vim can do all the xxd filtering back and forth automatically if you add the following in your .vimrc:

augroup Binary
	au!
	au BufReadPre  *.bin let &amp;bin=1
	au BufReadPost *.bin if &amp;bin &#124; %!xxd
	au BufReadPost *.bin set ft=xxd &#124; endif
	au BufWritePre *.bin if &amp;bin &#124; %!xxd -r
	au BufWritePre *.bin endif
	au BufWritePost *.bin if &amp;bin &#124; %!xxd
	au BufWritePost *.bin set nomod &#124; endif
augroup END

You also get nice syntax highlighting (if you have syntax highlighting correctly setup in general).

Change that &quot;*.bin&quot; to whatever comma-separated list of extension(s) you find yourself wanting to edit.

This tip actually comes from :help hex-editing
http://vimdoc.sourceforge.net/htmldoc/tips.html#hex-editing

Cheers, Janos
http://www.bashoneliners.com/</description>
		<content:encoded><![CDATA[<p>It gets better. Vim can do all the xxd filtering back and forth automatically if you add the following in your .vimrc:</p>
<p>augroup Binary<br />
	au!<br />
	au BufReadPre  *.bin let &amp;bin=1<br />
	au BufReadPost *.bin if &amp;bin | %!xxd<br />
	au BufReadPost *.bin set ft=xxd | endif<br />
	au BufWritePre *.bin if &amp;bin | %!xxd -r<br />
	au BufWritePre *.bin endif<br />
	au BufWritePost *.bin if &amp;bin | %!xxd<br />
	au BufWritePost *.bin set nomod | endif<br />
augroup END</p>
<p>You also get nice syntax highlighting (if you have syntax highlighting correctly setup in general).</p>
<p>Change that &#8220;*.bin&#8221; to whatever comma-separated list of extension(s) you find yourself wanting to edit.</p>
<p>This tip actually comes from :help hex-editing<br />
<a href="http://vimdoc.sourceforge.net/htmldoc/tips.html#hex-editing" rel="nofollow">http://vimdoc.sourceforge.net/htmldoc/tips.html#hex-editing</a></p>
<p>Cheers, Janos<br />
<a href="http://www.bashoneliners.com/" rel="nofollow">http://www.bashoneliners.com/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using vi as a hex editor by Janos</title>
		<link>http://www.linuxinstead.com/blog/2009/04/21/using-vi-as-a-hex-editor/comment-page-1/#comment-6444</link>
		<dc:creator>Janos</dc:creator>
		<pubDate>Sat, 14 Apr 2012 08:48:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxinstead.com/blog/?p=126#comment-6444</guid>
		<description>When you are creating a new binary file, you most probably want to set some flags before saving:
:set noeol
:set binary

Otherwise vi will append a newline (0x0a) at the end of the file.

This is only an issue when creating a new binary file. When you open an existing binary file vi automatically sets these flags for you.

Janos
http://www.bashoneliners.com/</description>
		<content:encoded><![CDATA[<p>When you are creating a new binary file, you most probably want to set some flags before saving:<br />
:set noeol<br />
:set binary</p>
<p>Otherwise vi will append a newline (0x0a) at the end of the file.</p>
<p>This is only an issue when creating a new binary file. When you open an existing binary file vi automatically sets these flags for you.</p>
<p>Janos<br />
<a href="http://www.bashoneliners.com/" rel="nofollow">http://www.bashoneliners.com/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using vi as a hex editor by sharp</title>
		<link>http://www.linuxinstead.com/blog/2009/04/21/using-vi-as-a-hex-editor/comment-page-1/#comment-6411</link>
		<dc:creator>sharp</dc:creator>
		<pubDate>Thu, 23 Feb 2012 04:46:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxinstead.com/blog/?p=126#comment-6411</guid>
		<description>Thanksfor the info (and the commenters), I hope xxd works as well standalone as it does with vi.</description>
		<content:encoded><![CDATA[<p>Thanksfor the info (and the commenters), I hope xxd works as well standalone as it does with vi.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using vi as a hex editor by Seriously</title>
		<link>http://www.linuxinstead.com/blog/2009/04/21/using-vi-as-a-hex-editor/comment-page-1/#comment-6385</link>
		<dc:creator>Seriously</dc:creator>
		<pubDate>Thu, 16 Feb 2012 13:53:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxinstead.com/blog/?p=126#comment-6385</guid>
		<description>Hey.

Thanks for not suppressing (entirely) the comment. With more research I found that vi&#039;s &quot;hexadecimal mode&quot; is a sort of urban legend, and, sadly, doesn&#039;t only belong to your blog. It would be harsh to ask EVERY blog editor to correct their version (which on the top of that are all slightly different). So, I give up. The world gonna stay the stinking heap of lies it is.

On the other hand your edits made me smile (I&#039;m not being sarcastic by the way), and I don&#039;t think my original text was that insulting. But I do agree, it wasn&#039;t that nice either and it&#039;s your blog.</description>
		<content:encoded><![CDATA[<p>Hey.</p>
<p>Thanks for not suppressing (entirely) the comment. With more research I found that vi&#8217;s &#8220;hexadecimal mode&#8221; is a sort of urban legend, and, sadly, doesn&#8217;t only belong to your blog. It would be harsh to ask EVERY blog editor to correct their version (which on the top of that are all slightly different). So, I give up. The world gonna stay the stinking heap of lies it is.</p>
<p>On the other hand your edits made me smile (I&#8217;m not being sarcastic by the way), and I don&#8217;t think my original text was that insulting. But I do agree, it wasn&#8217;t that nice either and it&#8217;s your blog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using vi as a hex editor by Kev</title>
		<link>http://www.linuxinstead.com/blog/2009/04/21/using-vi-as-a-hex-editor/comment-page-1/#comment-6355</link>
		<dc:creator>Kev</dc:creator>
		<pubDate>Sun, 12 Feb 2012 10:43:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxinstead.com/blog/?p=126#comment-6355</guid>
		<description>Thanks for giving me a nudge and reminding me to update my post. It was quite overdue. I know that most people are only looking for the quick tip and don&#039;t care how it works, but you&#039;re right, the explanation was misleading.</description>
		<content:encoded><![CDATA[<p>Thanks for giving me a nudge and reminding me to update my post. It was quite overdue. I know that most people are only looking for the quick tip and don&#8217;t care how it works, but you&#8217;re right, the explanation was misleading.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using vi as a hex editor by Seriously</title>
		<link>http://www.linuxinstead.com/blog/2009/04/21/using-vi-as-a-hex-editor/comment-page-1/#comment-6353</link>
		<dc:creator>Seriously</dc:creator>
		<pubDate>Sat, 11 Feb 2012 18:43:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxinstead.com/blog/?p=126#comment-6353</guid>
		<description>xxd is an awesome program, and vi(m) is another one. &lt;em&gt;[snip of insulting and obnoxious rant]&lt;/em&gt;

So, if you ever read that, I don&#039;t care if you remove this comment, AS LONG AS YOU CLEAR THINGS UP IN YOUR POST.

&lt;em&gt;[more snipping]&lt;/em&gt;, here is a more correct version of it :

&quot; Sometimes I find it useful to switch to hex mode when editing a file in vi. vi doesn&#039;t have such a feature, but it has the capability of using an external program as a &#039;filter&#039; (meaning that the input (stdin) of the program is taken from vi buffer, which is later replaced by its output (stdout)). xxd is the binary used to transform one&#039;s binary into hexadecimal and vice versa. The vi command for using it as a filter is not very obvious so thought I’d share…

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.

As you can easily figure it out, &#039;:[address-range] ! external-command-name&#039; is vi&#039;s command for filtering. % as an address-range means : everything in the buffer. See http://www.softpanorama.org/Editors/Vimorama/vim_piping.shtml for further information.&quot;</description>
		<content:encoded><![CDATA[<p>xxd is an awesome program, and vi(m) is another one. <em>[snip of insulting and obnoxious rant]</em></p>
<p>So, if you ever read that, I don&#8217;t care if you remove this comment, AS LONG AS YOU CLEAR THINGS UP IN YOUR POST.</p>
<p><em>[more snipping]</em>, here is a more correct version of it :</p>
<p>&#8221; Sometimes I find it useful to switch to hex mode when editing a file in vi. vi doesn&#8217;t have such a feature, but it has the capability of using an external program as a &#8216;filter&#8217; (meaning that the input (stdin) of the program is taken from vi buffer, which is later replaced by its output (stdout)). xxd is the binary used to transform one&#8217;s binary into hexadecimal and vice versa. The vi command for using it as a filter is not very obvious so thought I’d share…</p>
<p>So, open a file in vi as usual, hit escape and type:<br />
:%!xxd<br />
to switch into hex mode</p>
<p>And when your done hit escape again and type:<br />
:%!xxd -r<br />
to exit from hex mode.</p>
<p>As you can easily figure it out, &#8216;:[address-range] ! external-command-name&#8217; is vi&#8217;s command for filtering. % as an address-range means : everything in the buffer. See <a href="http://www.softpanorama.org/Editors/Vimorama/vim_piping.shtml" rel="nofollow">http://www.softpanorama.org/Editors/Vimorama/vim_piping.shtml</a> for further information.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using vi as a hex editor by Ritesh</title>
		<link>http://www.linuxinstead.com/blog/2009/04/21/using-vi-as-a-hex-editor/comment-page-1/#comment-6352</link>
		<dc:creator>Ritesh</dc:creator>
		<pubDate>Thu, 26 Jan 2012 08:49:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxinstead.com/blog/?p=126#comment-6352</guid>
		<description>Great tip! Thanks for sharing :)</description>
		<content:encoded><![CDATA[<p>Great tip! Thanks for sharing <img src='http://www.linuxinstead.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using vi as a hex editor by bill</title>
		<link>http://www.linuxinstead.com/blog/2009/04/21/using-vi-as-a-hex-editor/comment-page-1/#comment-6349</link>
		<dc:creator>bill</dc:creator>
		<pubDate>Sun, 06 Nov 2011 17:00:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxinstead.com/blog/?p=126#comment-6349</guid>
		<description>this is extremely useful.  I was about to try teach myself how to use yet another command line text editor, so this saved me some time.</description>
		<content:encoded><![CDATA[<p>this is extremely useful.  I was about to try teach myself how to use yet another command line text editor, so this saved me some time.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

