[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automatic shell CR escape \ alignment
From: |
Tim Landscheidt |
Subject: |
Re: Automatic shell CR escape \ alignment |
Date: |
Sat, 29 Oct 2011 00:53:50 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Tracy Reed <treed@edirectpublishing.com> wrote:
> When doing something like:
> command -option1 reallylongargument \
> -option2 evenlongerargumentfoo \
> -option3 oddlengthreallylongargument \
> -option4 reallylongargument \
> I really like to keep my code to 80 columns and line up those line-ending
> escape slashes so it looks neat. A few years ago someone showed me a really
> cool trick to be used when making shell scripts tidy: When in shell mode you
> could do something such that it would handle the column of \ in a special way
> and
> always keep them lined up and move them all in or out together whenever the
> length of the longest line changed. I have forgotten how it was done. Anyone
> know?
The basic concept is handled by align.el and there, appar-
ently, by basic-line-continuation. I don't know what custom-
izations you need for shell scripts, though (I usually pre-
fer manually calling align-regexp).
Tim