<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>vim Archives - Beshoy Girgis</title>
	<atom:link href="https://beshoy.girgis.us/tag/vim/feed/" rel="self" type="application/rss+xml" />
	<link>https://beshoy.girgis.us/tag/vim/</link>
	<description>Father, husband, son, nerd.</description>
	<lastBuildDate>Sun, 12 Mar 2017 08:10:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Linux: Make grep FAST</title>
		<link>https://beshoy.girgis.us/2012/10/linux-make-grep-fast/</link>
					<comments>https://beshoy.girgis.us/2012/10/linux-make-grep-fast/#respond</comments>
		
		<dc:creator><![CDATA[Beshoy Girgis]]></dc:creator>
		<pubDate>Fri, 12 Oct 2012 03:18:31 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nerdy]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[vim]]></category>
		<guid isPermaLink="false">http://beshoy.girgis.us/?p=192</guid>

					<description><![CDATA[I&#8217;m a searcher. I always grep for things. I use fun commands like: vim -p `grep -lR xyz .` Which finds all files containing xyz and automatically opens them as tabs in vim ( doesn&#8217;t work too well when a ton of files are found though 😉 ). At times however, grep&#8217;s just&#8230; a bit <a class="read-more" href="https://beshoy.girgis.us/2012/10/linux-make-grep-fast/">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<p>I&#8217;m a searcher. I always grep for things. I use fun commands like:</p>
<pre class="brush: bash; gutter: true">vim -p `grep -lR xyz .`</pre>
<p>Which finds all files containing xyz and automatically opens them as tabs in vim ( doesn&#8217;t work too well when a ton of files are found though <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> ). At times however, grep&#8217;s just&#8230; a bit slow.. A client of mine has a site with a considerable amount of data in the site&#8217;s directory. I needed to find any file containing &#8220;16777216&#8221; &#8212; 16MB in bytes because he&#8217;s increasing his upload limit to 1GB. I tried a grep on the root of the site for that and&#8230;. went in search for a faster way after about 4 minutes of grepping &#8212; command was:</p>
<pre class="brush: bash; gutter: true">grep -lR "16777216" .</pre>
<p>and.. after about 5 minutes, I gave up and started searching for a faster method. I found a post on stackoverflow which showed that simply by piping php files I&#8217;d make the grep considerably faster:</p>
<pre class="brush: bash; gutter: true">time find ./ -name "*" -print0 | xargs -0 -n1 -P8 grep -H "16777216" &gt;&gt; 16mb.find
real	0m0.409s
user	0m0.517s
sys	0m1.470s</pre>
<p>So there you have it.. giving up after 5 minutes versus a full list within about a second.. WIN <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>By the way.. in the command above, you&#8217;ll see -P8 after xargs. That allows you to tell xargs to utilize that many procs ( processors ):</p>
<pre class="brush: bash; gutter: true">       --max-procs=max-procs, -P max-procs
              Run up to max-procs processes at a time; the default is 1.  If max-procs is 0, xargs will run as many processes as possible at a time.  Use the -n  option  with
              -P; otherwise chances are that only one exec will be done.</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://beshoy.girgis.us/2012/10/linux-make-grep-fast/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Windows 7: Set GVIM as Default Text Editor</title>
		<link>https://beshoy.girgis.us/2012/08/windows-7-set-gvim-as-default-text-editor/</link>
					<comments>https://beshoy.girgis.us/2012/08/windows-7-set-gvim-as-default-text-editor/#comments</comments>
		
		<dc:creator><![CDATA[Beshoy Girgis]]></dc:creator>
		<pubDate>Mon, 27 Aug 2012 15:28:14 +0000</pubDate>
				<category><![CDATA[Nerdy]]></category>
		<category><![CDATA[gvim]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[windows]]></category>
		<guid isPermaLink="false">https://beshoy.girgis.us/?p=161</guid>

					<description><![CDATA[I love VIM.  It&#8217;s my favorite IDE.  I also hate notepad.  It&#8217;s extremely primitive and in no-way intuitive.  For that reason, I set GVIM ( Graphical VIM ) as the default text editor in my Windows environment &#8212; here&#8217;s the command: ftype txtfile="C:\Program Files (x86)\Vim\vim73\gvim.exe" --remote-tab-silent "%1" Please note, this command must be run as <a class="read-more" href="https://beshoy.girgis.us/2012/08/windows-7-set-gvim-as-default-text-editor/">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<p>I love VIM.  It&#8217;s my favorite IDE.  I also hate notepad.  It&#8217;s extremely primitive and in no-way intuitive.  For that reason, I set GVIM ( Graphical VIM ) as the default text editor in my Windows environment &#8212; here&#8217;s the command:</p>
<pre lang="dos">ftype txtfile="C:\Program Files (x86)\Vim\vim73\gvim.exe" --remote-tab-silent "%1"</pre>
<p>Please note, this command must be run as an administrator.  Click start, type &#8220;cmd&#8221;, right click &#8220;cmd.exe&#8221; and click &#8220;Run as administrator&#8221;.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://beshoy.girgis.us/2012/08/windows-7-set-gvim-as-default-text-editor/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 34/92 objects using disk
Page Caching using disk: enhanced 
Lazy Loading (feed)
Minified using disk
Database Caching using disk (Request-wide modification query)

Served from: beshoy.girgis.us @ 2026-06-12 02:46:00 by W3 Total Cache
-->