About perltidy in Emacs:
I'm not sure I understand, isn't that just a shell-command-on-region command after a mark-whole-buffer?
Yes, these are parts of the solution. The other parts are:
- Be able to restrict the perltidy-run to the current function, or the current region (i.e. avoid cosmetic changes in untouched places of the file which mess up VC history)
- Don't let .tdy and .ERR files mess up your source directories
- Present the source before and after tidying in an ediff session (with a bit of fine print like re-using an existing ediff session, so that you can re-run the command from within the ediff session, e.g. after accepting some changes)
...And indeed, indenting can be a mess. But it is improving. That's what I get with "hot" cperl-mode.el and PBP settings. The closing braces are under the first nonspace character of the line containing the opening braces, which I find ok.
Note the newline before the last semicolon. This indicates that this semicolon is a new statement (or superfluous)!
for my $x (@x) {
my %h = (
'truncate' => {
'desc' => 'shorten a file',
'usage' => [
'truncate FILEHANDLE,LENGTH',
'truncate EXPR,LENGTH',
]
}
);
}
;
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|