Wiki: DebugInfo: TutorialExtentions


Detailed view of a page, which is probably more useful for debugging than anything else.

Querying backend directly for 'TutorialExtentions'

get_pagedata('TutorialExtentions')
 _cached_html 
transformedtext Object
(
    [_type] => pagetype_wikitext Object
        (
        )

    [_basepage] => TutorialExtentions
    [_content] => Array
        (
            [0] => <div class="wikitext"><ul><li class="tightenable top bottom">Possible Contender*</li>
</ul>
<pre class="tightenable top">
&lt;Lars_G&gt; stupid question, I am trying to eliminate blank lines on a file.... tried :%s/^$// and it marks all blank lines but they are not eliminated
&lt;Lars_G&gt; any ideas please?
&lt;p0g&gt; :g/^$/d
&lt;Lars_G&gt; thanks... what is g? never used it before.
&lt;p0g&gt; global
--&gt; zeedo (zeedo@www.bsrf.org.uk) has joined #vim
&lt;-- strull_at_w has quit (&quot;leaving&quot;)
&lt;Lars_G&gt; I see, it matches lines based on the regexp and applies command d to them
&lt;Lars_G&gt; interesting...
&lt;
            [1] => cached_userlink Object
                (
                    [_page] => MetaCosm
                )

            [2] => &gt; uws: also, changing the tw doesn't excuse the depth :)
&lt;
            [3] => cached_userlink Object
                (
                    [_page] => MetaCosm
                )

            [4] => &gt; it just makes it seem less fugly
&lt;Lars_G&gt; thanks, pretty powerfull, a new day, a new command in vim learnt
&lt;p0g&gt; yes, it's where g/re/p comes from :)
&lt;Lars_G&gt; p0g, can regexps be conbined with ranges that way too?
 lampus Lars_G
&lt;Lars_G&gt; something like :5,12/^$/d for example?
&lt;p0g&gt; that would be :5,12g/^$/d
&lt;Lars_G&gt; thanks
&lt;Lars_G&gt; vim rules
&lt;Lars_G&gt; it's so powerfull it's scary
&lt;
            [5] => cached_userlink Object
                (
                    [_page] => MetaCosm
                )

            [6] => &gt; Lars_G: yep
&lt;Lars_G&gt; so lets say, ident all non-empty lines from 5 to 12 would be :5,12g/^.+$/&lt;
&lt;Lars_G&gt; ident left
&lt;Lars_G&gt; de-ident actually
&lt;
            [7] => cached_userlink Object
                (
                    [_page] => MetaCosm
                )

            [8] => &gt; Lars_G: one thing to be aware of
&lt;Lars_G&gt; yes?
&lt;
            [9] => cached_userlink Object
                (
                    [_page] => MetaCosm
                )

            [10] => &gt; after the final /
&lt;
            [11] => cached_userlink Object
                (
                    [_page] => MetaCosm
                )

            [12] => &gt; that is Ex commands
&lt;
            [13] => cached_userlink Object
                (
                    [_page] => MetaCosm
                )

            [14] => &gt; not &quot;normal&quot; commands
&lt;
            [15] => cached_userlink Object
                (
                    [_page] => MetaCosm
                )

            [16] => &gt; but you can fix that by doing
&lt;Lars_G&gt; Not Vi, only Ex? thanks
&lt;
            [17] => cached_userlink Object
                (
                    [_page] => MetaCosm
                )

            [18] => &gt; :g/this/normal &lt;
&lt;
            [19] => cached_userlink Object
                (
                    [_page] => MetaCosm
                )

            [20] => &gt; that will be normal commands for sure
&lt;
            [21] => cached_userlink Object
                (
                    [_page] => MetaCosm
                )

            [22] => &gt; just as you are used to them
&lt;Lars_G&gt; normal changes to Vi(m) mode then....
&lt;Lars_G&gt; thanks
&lt;-- Esaj has quit (&quot;Client exiting&quot;)
&lt;p0g&gt; &lt; is an ex command too
&lt;Lars_G&gt; Yes I know what Ex is ;)
&lt;
            [23] => cached_userlink Object
                (
                    [_page] => MetaCosm
                )

            [24] => &gt; p0g: well, my example was more for general
&lt;
            [25] => cached_userlink Object
                (
                    [_page] => MetaCosm
                )

            [26] => &gt; not the specific command he was using
&lt;Lars_G&gt; yes I understood, thanks for the remark.
&lt;p0g&gt; Lars_G: and :v means &quot;does not match&quot;, so you could use :5,12v/^$/&lt;
&lt;p0g&gt; but shifting empty lines doesn't work anyway
&lt;Lars_G&gt; p0g: they're the left sided version of 
            [27] => cached_wikilink Object
                (
                    [_page] => RegExps
                )

            [28] =>  normal flags then, g, v, does caseless matching apply too? (s i think it was? no... U???)
&lt;Lars_G&gt; p0g, Yes it was a bad example :)
&lt;p0g&gt; huh, left sided version of regexps normal flags?
&lt;p0g&gt; what's that supposed to mean
&lt;Lars_G&gt; g is regexp's flag for global
&lt;Lars_G&gt; :s/soemthing/else/g &lt;----
&lt;tazz&gt; p0g, hmm.. is that about grep true? :)
&lt;p0g&gt; oh, no it's not like that
&lt;Lars_G&gt; ok
&lt;Lars_G&gt; thanks
&lt;p0g&gt; tazz: yes, but it's from ed, not vim
&lt;tazz&gt; Cool.. but why 're'?
&lt;tazz&gt; Could be anything
&lt;p0g&gt; regular expression
&lt;tazz&gt; I see
&lt;Lars_G&gt; Yes I try not to say &quot;grep&quot; not to mention an implementation of regular expressions but the concept of regular expressions themselves...
&lt;Lars_G&gt; :) that's why I walways say 
            [29] => cached_wikilink Object
                (
                    [_page] => RegExps
                )

            [30] =>  instead of Grep or regs and eregs
&lt;Lars_G&gt; :)
&lt;Lars_G&gt; Or Perl, the world famous bloated 
            [31] => cached_wikilink Object
                (
                    [_page] => RegExps
                    [_label] => RegExp
                )

            [32] =>  engine ;) (Joke, I respect perl a lot.)</pre>
<p class="tightenable bottom">Have you seem this article describing vim for Mac users?:
&quot;What Is Vim (It's Easier than You Think)&quot;
by Matthew Russell 07/11/2006

            [33] => cached_externallink Object
                (
                    [_url] => http://www.macdevcenter.com/pub/a/mac/2006/07/11/vim-is-easier-than-you-think.html
                )

            [34] => </p>
</div>

        )

)
 hits  3163
get_versiondata('TutorialExtentions',16)
 %content  *Possible Contender* <pre> <Lars_G> stup ...
 author  84.148.192.144
 author_id  84.148.192.144
 is_minor_edit   
 markup  2
 mtime  1189203351
 pagetype  wikitext
 summary  removed spam
get_versiondata('TutorialExtentions',15)
 %content  *Possible Contender* <pre> <Lars_G> stup ...
 _supplanted  1189203351
 author  WikiWord
 author_id  WikiWord
 is_minor_edit   
 markup  2
 mtime  1186732968
 pagetype  wikitext
get_versiondata('TutorialExtentions',14)
 %content  *Possible Contender* <pre> <Lars_G> stup ...
 _supplanted  1186732968
 author  WikiWord
 author_id  WikiWord
 is_minor_edit   
 markup  2
 mtime  1186732636
 pagetype  wikitext
get_versiondata('TutorialExtentions',13)
 %content  *Possible Contender* <pre> <Lars_G> stup ...
 _supplanted  1186732636
 author  WikiWord
 author_id  WikiWord
 is_minor_edit   
 markup  2
 mtime  1184337697
 pagetype  wikitext
get_versiondata('TutorialExtentions',10)
 %content  *Possible Contender* <pre> <Lars_G> stup ...
 _supplanted  1183040722
 author  70.189.73.224
 author_id  70.189.73.224
 is_minor_edit   
 markup  2
 mtime  1159296397
 pagetype  wikitext
 summary  vim for Mac users
get_versiondata('TutorialExtentions',9)
 %content  *Possible Contender* <pre> <Lars_G> stup ...
 _supplanted  1159296397
 author  AristotlePagaltzis
 author_id  AristotlePagaltzis
 is_minor_edit  1
 markup  2
 mtime  1154656693
 pagetype  wikitext
 summary  category

Copyright © 2007 RobertMelton.com