[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: perlstyle and portability
>I guess there are three camps here then:
> 1. don't care, but leave ts=8 alone dammit!
> 2. only spaces for indents dammit!
> 3. only tabs for indents dammit!
...
>I'm firmly in camp #1, and see little reason for changing anything.
As am I. One of the Vi Commandments is "Thou shalt set thy tabstops
to eight and LEAVE THEM BE!" Anything else is a miserable pain in
many places better left unsaid.
People often just don't understand how to use vi. It frightening.
You don't use ^I to intend a blockstop. You use ^T.
1) Indent with ^T (in insert mode)
2) Undent with ^D (in insert mode)
3) Blockdent with ^O (in insert mode)
It's good to learn how to use << and <% and all that, too.
+--------------------------------+
| pipe me through perl -x | less |
+--------------------------------+
#!/usr/bin/perl
while (<DATA>) {
next if ? ^ begin ?x;
last if ? ^ end $ ?x;
print unpack u => $_;
}
__END__
begin 644 vistuff
M(@ES;R!T86)S(&QO;VL@<FEG:'0@9F]R('5S.R!C:&%N9V4@=&AI<R!A;F0@
M9&EE(`IS970@=&%B<W1O<#TX(`HB"B()<V\@7E0@86YD(#P\(&%R92!S;6%L
M;&5R(`IS970@<VAI9G1W:61T:#TT"B(*(@ET:&ES(&ES('1H92!S;W5R8V4@
M;V8@86QL(&AA<'!I;F5S<PIM87`A(`\@>PU](!M/%`HB"B(@"71H:7,@=VEL
M;"!S:&EF="!T:&4@8F]D>2!O9B!A(&)L;V-K(&)U="!N;W0@:71S(&]U=&5R
M('!A<G0*;6%P(%Q3(#XE/#PE/#P*(@HB"71H:7,@=VEL;"!B96=I;B!A(&)L
M;V-K+"!L96%V:6YG(&EN(&EN<V5R="!M;V1E"FUA<"$@'2`;+WT-80HB"6%N
M9"!T:&ES("!W:6QL('1A:V4@>6]U('!A<W0@:71S(&5N9"P@;&5A=FEN9R!I
.;B!I;G-E<G0@;6]D90IA
`
end
(And now, what are the other V Commandments? :-)
--tom
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]