<?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 on: Vim Advanced Tutorial Videos</title>
	<atom:link href="http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-advanced-tutorial-videos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.derekwyatt.org</link>
	<description>Vim... and stuff</description>
	<lastBuildDate>Wed, 25 Jan 2012 21:22:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Derek Wyatt</title>
		<link>http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-advanced-tutorial-videos/comment-page-1/#comment-33879</link>
		<dc:creator>Derek Wyatt</dc:creator>
		<pubDate>Wed, 07 Dec 2011 10:14:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.derekwyatt.org/?page_id=16#comment-33879</guid>
		<description>If all you need to do is stitch a couple of things together then a macro or a function would do just fine.  Once you&#039;ve got that, you can just call it as much as you need to get things done.

Another way to go would be to wreck the buffer.  Check the destruction video (start around 1:50) - &lt;a href=&quot;http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-intermediate-tutorial-videos/#destruction&quot; rel=&quot;nofollow&quot;&gt;Destruction&lt;/a&gt;.

If you wipe out all of the stuff you don&#039;t need, and then append the &#039;,&#039; and &#039;:&#039; to the ends of the lines, then just join everything up.  Again, toss that in a macro or a function, make the call and you&#039;re done.</description>
		<content:encoded><![CDATA[<p>If all you need to do is stitch a couple of things together then a macro or a function would do just fine.  Once you&#8217;ve got that, you can just call it as much as you need to get things done.</p>
<p>Another way to go would be to wreck the buffer.  Check the destruction video (start around 1:50) &#8211; <a href="http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-intermediate-tutorial-videos/#destruction" rel="nofollow">Destruction</a>.</p>
<p>If you wipe out all of the stuff you don&#8217;t need, and then append the &#8216;,&#8217; and &#8216;:&#8217; to the ends of the lines, then just join everything up.  Again, toss that in a macro or a function, make the call and you&#8217;re done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick</title>
		<link>http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-advanced-tutorial-videos/comment-page-1/#comment-33818</link>
		<dc:creator>Rick</dc:creator>
		<pubDate>Tue, 06 Dec 2011 20:04:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.derekwyatt.org/?page_id=16#comment-33818</guid>
		<description>Unfortunately, its confidential information.  I am not at liberty to post the 4k line document.  In fact, it is 100 documents of this size (yikes), but I have the vim netrw with elinks that will incrementally loop through the 100 webpages and dump the contents of each into a vim buffer (nice) for them to be parsed by the code I am inquiring about - before proceeding to the next.  

But, yes, each document is consistently formated and conducive to capturing the information through regexes - that&#039;s the upside.  Here&#039;s a visual:

This is category A, Section 10:
    ...maybe 200 lines of stuff I don&#039;t need....

    Company 1 Info
    Company 1 People
    Company 1 Projects
    ...maybe 100 lines of stuff I don&#039;t need...

    Company 2 Info
    Company 2 People
    Company 2 Projects
    ...maybe 100 lines of stuff I don&#039;t need...

    Company 3 Info
    Company 3 People
    Company 3 Projects
    ...maybe 100 lines of stuff I don&#039;t need...

    Company 4 Info
    Company 4 People
    Company 4 Projects
    ...maybe 100 lines of stuff I don&#039;t need...

This is category B, Section 11:
...repeating (categorically) again 4 more times...

All of the lines are very consistent and easy to find via regular expressions.  The problem is that I need to build an end result of:

CatA,Sec10,Company1:People1:Projects1
CatA,Sec10,Company2:People2:Projects2
CatA,Sec10,Company3:People3:Projects3
CatA,Sec10,Company4:People4:Projects4
CatB,Sec11,Company5:People5:Projects5  &lt;--and so on

This means I need to collect the Category and Section from the main category heading (easy) and then apply that to the sub-categories below it.  I can easily capture the category information and I can easily capture the sub-category information - due to the consistency of the format and naming conventions.  And, I can easily reformat the captured data and output it to a new file that will be good for uploading it to where I want it.  I am (intellectually) failing at tying the two search/captures together in order to keep their association.  

Thank for the quick response, Derek.  :)</description>
		<content:encoded><![CDATA[<p>Unfortunately, its confidential information.  I am not at liberty to post the 4k line document.  In fact, it is 100 documents of this size (yikes), but I have the vim netrw with elinks that will incrementally loop through the 100 webpages and dump the contents of each into a vim buffer (nice) for them to be parsed by the code I am inquiring about &#8211; before proceeding to the next.  </p>
<p>But, yes, each document is consistently formated and conducive to capturing the information through regexes &#8211; that&#8217;s the upside.  Here&#8217;s a visual:</p>
<p>This is category A, Section 10:<br />
    &#8230;maybe 200 lines of stuff I don&#8217;t need&#8230;.</p>
<p>    Company 1 Info<br />
    Company 1 People<br />
    Company 1 Projects<br />
    &#8230;maybe 100 lines of stuff I don&#8217;t need&#8230;</p>
<p>    Company 2 Info<br />
    Company 2 People<br />
    Company 2 Projects<br />
    &#8230;maybe 100 lines of stuff I don&#8217;t need&#8230;</p>
<p>    Company 3 Info<br />
    Company 3 People<br />
    Company 3 Projects<br />
    &#8230;maybe 100 lines of stuff I don&#8217;t need&#8230;</p>
<p>    Company 4 Info<br />
    Company 4 People<br />
    Company 4 Projects<br />
    &#8230;maybe 100 lines of stuff I don&#8217;t need&#8230;</p>
<p>This is category B, Section 11:<br />
&#8230;repeating (categorically) again 4 more times&#8230;</p>
<p>All of the lines are very consistent and easy to find via regular expressions.  The problem is that I need to build an end result of:</p>
<p>CatA,Sec10,Company1:People1:Projects1<br />
CatA,Sec10,Company2:People2:Projects2<br />
CatA,Sec10,Company3:People3:Projects3<br />
CatA,Sec10,Company4:People4:Projects4<br />
CatB,Sec11,Company5:People5:Projects5  &lt;&#8211;and so on</p>
<p>This means I need to collect the Category and Section from the main category heading (easy) and then apply that to the sub-categories below it.  I can easily capture the category information and I can easily capture the sub-category information &#8211; due to the consistency of the format and naming conventions.  And, I can easily reformat the captured data and output it to a new file that will be good for uploading it to where I want it.  I am (intellectually) failing at tying the two search/captures together in order to keep their association.  </p>
<p>Thank for the quick response, Derek.  :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derek Wyatt</title>
		<link>http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-advanced-tutorial-videos/comment-page-1/#comment-33813</link>
		<dc:creator>Derek Wyatt</dc:creator>
		<pubDate>Tue, 06 Dec 2011 19:15:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.derekwyatt.org/?page_id=16#comment-33813</guid>
		<description>@Rick

I&#039;m having a tough time visualizing the problem.  Can you post something to http://gist.github.com so I can see it?

If the text is structured (as you seem to indicate) this may be a candidate for a macro or a function, depending on whether this is a &quot;one off&quot; or something you want to do more often.

One thing I can suggest is to try and &quot;:copy&quot; the data to the end of the file as you accumulate what you want and then work with it from there.  It might be easier to deal with when you&#039;ve put it into a known location with a known format.

But, if you post to gist then I&#039;ll be able to think about it much easier.</description>
		<content:encoded><![CDATA[<p>@Rick</p>
<p>I&#8217;m having a tough time visualizing the problem.  Can you post something to <a href="http://gist.github.com" rel="nofollow">http://gist.github.com</a> so I can see it?</p>
<p>If the text is structured (as you seem to indicate) this may be a candidate for a macro or a function, depending on whether this is a &#8220;one off&#8221; or something you want to do more often.</p>
<p>One thing I can suggest is to try and &#8220;:copy&#8221; the data to the end of the file as you accumulate what you want and then work with it from there.  It might be easier to deal with when you&#8217;ve put it into a known location with a known format.</p>
<p>But, if you post to gist then I&#8217;ll be able to think about it much easier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick</title>
		<link>http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-advanced-tutorial-videos/comment-page-1/#comment-33808</link>
		<dc:creator>Rick</dc:creator>
		<pubDate>Tue, 06 Dec 2011 18:37:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.derekwyatt.org/?page_id=16#comment-33808</guid>
		<description>Hi Derek, I&#039;ve financially contributed to you and really appreciate your spirit and knowledge.  Can you give me an &quot;overview&quot; solution to this problem?

A 4,000 line document with 4 &quot;categories&quot; (say, 1,000 lines of a main category).  Within each of these sections there are 5 more repeating bits of information (say, sub-category information).  I need to save the individual sub-category information and append to each of them some information obtained from it&#039;s parent category.  

So, I can :g/find-a-main-category-line-using-regexps/s/collect-submatch-info/\=save-that-info-by-calling-a-function

My intellectual struggle is on how to drop down through the next ~1000 lines within that category to pickup the desired sub-category information.  I see only two options, but I think I am missing the best one:

1). I can extend the original regexp (that finds the main category info) and make it discover the lower sub-category information all at once - then bulk save them together.  This would mean a seriously long regexp, which is fine if that&#039;s the best method.

2). I can collect each main category into a register, then act upon that register by passing it back into a another substitute/submatch query.  Under this approach I would probably need to repeat that method again in order to separate the lower sub-categories from each other.

What I &quot;feel&quot; that I SHOULD be able to do is search for the main categories (as described above) and then - once found - continue down (like a sub-search) into the sub-category information, until it finishes collecting the information before proceeding to and through the next main category.  I can only get the query that finds the main categories to run through all of the main categories (and not &quot;stopping&quot; to gather the sub-category information - essentially losing my ability to discover the sub-category information IN RELATION to the main category in which it resides.  

Yikes, sorry for the verbosity.  Any &quot;guidance&quot; or &quot;direction&quot; would be much appreciated.</description>
		<content:encoded><![CDATA[<p>Hi Derek, I&#8217;ve financially contributed to you and really appreciate your spirit and knowledge.  Can you give me an &#8220;overview&#8221; solution to this problem?</p>
<p>A 4,000 line document with 4 &#8220;categories&#8221; (say, 1,000 lines of a main category).  Within each of these sections there are 5 more repeating bits of information (say, sub-category information).  I need to save the individual sub-category information and append to each of them some information obtained from it&#8217;s parent category.  </p>
<p>So, I can :g/find-a-main-category-line-using-regexps/s/collect-submatch-info/\=save-that-info-by-calling-a-function</p>
<p>My intellectual struggle is on how to drop down through the next ~1000 lines within that category to pickup the desired sub-category information.  I see only two options, but I think I am missing the best one:</p>
<p>1). I can extend the original regexp (that finds the main category info) and make it discover the lower sub-category information all at once &#8211; then bulk save them together.  This would mean a seriously long regexp, which is fine if that&#8217;s the best method.</p>
<p>2). I can collect each main category into a register, then act upon that register by passing it back into a another substitute/submatch query.  Under this approach I would probably need to repeat that method again in order to separate the lower sub-categories from each other.</p>
<p>What I &#8220;feel&#8221; that I SHOULD be able to do is search for the main categories (as described above) and then &#8211; once found &#8211; continue down (like a sub-search) into the sub-category information, until it finishes collecting the information before proceeding to and through the next main category.  I can only get the query that finds the main categories to run through all of the main categories (and not &#8220;stopping&#8221; to gather the sub-category information &#8211; essentially losing my ability to discover the sub-category information IN RELATION to the main category in which it resides.  </p>
<p>Yikes, sorry for the verbosity.  Any &#8220;guidance&#8221; or &#8220;direction&#8221; would be much appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Norman</title>
		<link>http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-advanced-tutorial-videos/comment-page-1/#comment-24531</link>
		<dc:creator>Norman</dc:creator>
		<pubDate>Wed, 03 Aug 2011 21:36:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.derekwyatt.org/?page_id=16#comment-24531</guid>
		<description>Great stuff!

I really learned a lot from this!
Thanks!</description>
		<content:encoded><![CDATA[<p>Great stuff!</p>
<p>I really learned a lot from this!<br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derek Wyatt</title>
		<link>http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-advanced-tutorial-videos/comment-page-1/#comment-23964</link>
		<dc:creator>Derek Wyatt</dc:creator>
		<pubDate>Wed, 27 Jul 2011 08:45:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.derekwyatt.org/?page_id=16#comment-23964</guid>
		<description>Sorry man, I don&#039;t have it.  It&#039;s dead easy to get some XML though; just download freemind, make a map, and hit &quot;save&quot; :)</description>
		<content:encoded><![CDATA[<p>Sorry man, I don&#8217;t have it.  It&#8217;s dead easy to get some XML though; just download freemind, make a map, and hit &#8220;save&#8221; :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kymnyth</title>
		<link>http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-advanced-tutorial-videos/comment-page-1/#comment-23957</link>
		<dc:creator>kymnyth</dc:creator>
		<pubDate>Wed, 27 Jul 2011 04:58:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.derekwyatt.org/?page_id=16#comment-23957</guid>
		<description>Can you provide the xml that was used for the final tutorial.  i.e. freemind xml  I would like to work my way through what you did here but you were really quick and starting with what you started with would be very helpful.</description>
		<content:encoded><![CDATA[<p>Can you provide the xml that was used for the final tutorial.  i.e. freemind xml  I would like to work my way through what you did here but you were really quick and starting with what you started with would be very helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-advanced-tutorial-videos/comment-page-1/#comment-19022</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Sun, 29 May 2011 06:02:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.derekwyatt.org/?page_id=16#comment-19022</guid>
		<description>Thanks for doing this! These videos have been fun to watch and a great help.</description>
		<content:encoded><![CDATA[<p>Thanks for doing this! These videos have been fun to watch and a great help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fifou</title>
		<link>http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-advanced-tutorial-videos/comment-page-1/#comment-16464</link>
		<dc:creator>fifou</dc:creator>
		<pubDate>Mon, 25 Apr 2011 20:45:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.derekwyatt.org/?page_id=16#comment-16464</guid>
		<description>Hi!

I now have a few years experience with Vim but I see all your videos because you&#039;re funny ^^

I&#039;m no more a beginner but your video &quot;Globals, Commands and Functions&quot; impress me! Thank you for your great work!</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>I now have a few years experience with Vim but I see all your videos because you&#8217;re funny ^^</p>
<p>I&#8217;m no more a beginner but your video &#8220;Globals, Commands and Functions&#8221; impress me! Thank you for your great work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kirobee</title>
		<link>http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-advanced-tutorial-videos/comment-page-1/#comment-16117</link>
		<dc:creator>kirobee</dc:creator>
		<pubDate>Thu, 21 Apr 2011 07:18:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.derekwyatt.org/?page_id=16#comment-16117</guid>
		<description>I had some slight trouble while trying to use t. in the normal mode, what obviously didn&#039;t work. When I got some sleep it came to me :).

It seems that the pipe &#124; much work like on the command line. I wasn&#039;t sure about the scope of the substitution.

&gt;Now… go read the help :)
Got me. Didn&#039;t tried to hard. The help is really monumental ^^.

Thanks and really great work. I&#039;ve learned alot!</description>
		<content:encoded><![CDATA[<p>I had some slight trouble while trying to use t. in the normal mode, what obviously didn&#8217;t work. When I got some sleep it came to me :).</p>
<p>It seems that the pipe | much work like on the command line. I wasn&#8217;t sure about the scope of the substitution.</p>
<p>&gt;Now… go read the help :)<br />
Got me. Didn&#8217;t tried to hard. The help is really monumental ^^.</p>
<p>Thanks and really great work. I&#8217;ve learned alot!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

