Detailed view of a page, which is probably more useful for debugging than anything else.
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"> <Lars_G> 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 <Lars_G> any ideas please? <p0g> :g/^$/d <Lars_G> thanks... what is g? never used it before. <p0g> global --> zeedo (zeedo@www.bsrf.org.uk) has joined #vim <-- strull_at_w has quit ("leaving") <Lars_G> I see, it matches lines based on the regexp and applies command d to them <Lars_G> interesting... < [1] => cached_userlink Object ( [_page] => MetaCosm ) [2] => > uws: also, changing the tw doesn't excuse the depth :) < [3] => cached_userlink Object ( [_page] => MetaCosm ) [4] => > it just makes it seem less fugly <Lars_G> thanks, pretty powerfull, a new day, a new command in vim learnt <p0g> yes, it's where g/re/p comes from :) <Lars_G> p0g, can regexps be conbined with ranges that way too? lampus Lars_G <Lars_G> something like :5,12/^$/d for example? <p0g> that would be :5,12g/^$/d <Lars_G> thanks <Lars_G> vim rules <Lars_G> it's so powerfull it's scary < [5] => cached_userlink Object ( [_page] => MetaCosm ) [6] => > Lars_G: yep <Lars_G> so lets say, ident all non-empty lines from 5 to 12 would be :5,12g/^.+$/< <Lars_G> ident left <Lars_G> de-ident actually < [7] => cached_userlink Object ( [_page] => MetaCosm ) [8] => > Lars_G: one thing to be aware of <Lars_G> yes? < [9] => cached_userlink Object ( [_page] => MetaCosm ) [10] => > after the final / < [11] => cached_userlink Object ( [_page] => MetaCosm ) [12] => > that is Ex commands < [13] => cached_userlink Object ( [_page] => MetaCosm ) [14] => > not "normal" commands < [15] => cached_userlink Object ( [_page] => MetaCosm ) [16] => > but you can fix that by doing <Lars_G> Not Vi, only Ex? thanks < [17] => cached_userlink Object ( [_page] => MetaCosm ) [18] => > :g/this/normal < < [19] => cached_userlink Object ( [_page] => MetaCosm ) [20] => > that will be normal commands for sure < [21] => cached_userlink Object ( [_page] => MetaCosm ) [22] => > just as you are used to them <Lars_G> normal changes to Vi(m) mode then.... <Lars_G> thanks <-- Esaj has quit ("Client exiting") <p0g> < is an ex command too <Lars_G> Yes I know what Ex is ;) < [23] => cached_userlink Object ( [_page] => MetaCosm ) [24] => > p0g: well, my example was more for general < [25] => cached_userlink Object ( [_page] => MetaCosm ) [26] => > not the specific command he was using <Lars_G> yes I understood, thanks for the remark. <p0g> Lars_G: and :v means "does not match", so you could use :5,12v/^$/< <p0g> but shifting empty lines doesn't work anyway <Lars_G> 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???) <Lars_G> p0g, Yes it was a bad example :) <p0g> huh, left sided version of regexps normal flags? <p0g> what's that supposed to mean <Lars_G> g is regexp's flag for global <Lars_G> :s/soemthing/else/g <---- <tazz> p0g, hmm.. is that about grep true? :) <p0g> oh, no it's not like that <Lars_G> ok <Lars_G> thanks <p0g> tazz: yes, but it's from ed, not vim <tazz> Cool.. but why 're'? <tazz> Could be anything <p0g> regular expression <tazz> I see <Lars_G> Yes I try not to say "grep" not to mention an implementation of regular expressions but the concept of regular expressions themselves... <Lars_G> :) that's why I walways say [29] => cached_wikilink Object ( [_page] => RegExps ) [30] => instead of Grep or regs and eregs <Lars_G> :) <Lars_G> 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?: "What Is Vim (It's Easier than You Think)" 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 |