Catalyst-Manual

 view release on metacpan or  search on metacpan

lib/Catalyst/Manual/Tutorial/10_Appendices.pod  view on Meta::CPAN


C<"%s/^    ">

A shortcut for the previous item (C<%> specifies the entire file; so
this removes four leading spaces from every line).

=item *

C<":.,$s/^    ">

Removes the first four spaces from the line the cursor is on at the time
the regex command is executed (".") to the last line of the file.

=item *

C<":.,44s/^    ">

Removes four leading space from the current line through line 44
(obviously adjust the C<44> to the appropriate value in your example).

=back

lib/Catalyst/Manual/Tutorial/10_Appendices.pod  view on Meta::CPAN

    Replace regexp: ^    <RET>
    with: <RET>

All of that will occur on the single line at the bottom of your screen.
Note that "<RET>" represents the return key/enter.  Also, there are
four spaces after the "^" on the "Replace regexp:" line and no spaces
entered on the last line.

You can limit the replacement operation by selecting text first (depending
on your version of Emacs, you can either use the mouse or experiment with
commands such as C<C-SPC> to set the mark at the cursor location and
C<< C-< >> and C<< C-> >> to set the mark at the beginning and end of the
file respectively.

Also, Stefan Kangas sent in the following tip about an alternate
approach using the command C<indent-region> to redo the indentation
for the currently selected region (adhering to indent rules in the
current major mode). You can run the command by typing M-x
indent-region or pressing the default keybinding C-M-\ in cperl-mode.
Additional details can be found here:



( run in 0.460 second using v1.01-cache-2.11-cpan-4d50c553e7e )