unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Perl mode multiple line quote (qq)
@ 2008-04-29 15:39 L. D. James
  2008-05-02 15:11 ` Xah
  0 siblings, 1 reply; 3+ messages in thread
From: L. D. James @ 2008-04-29 15:39 UTC (permalink / raw)
  To: help-gnu-emacs

Does anyone know of a setting for cperl-mode (or perl-mode) that will
add the feature to allow hitting the tab key to indent when using
multiple quoted lines such as:

print qq~
(tab) This is a tabulated list.
(tab)(tab) item #1
(tab)(tab) item #2
(tab) This is list B
(tab)(tab) Item 2 of list b
(tab)(tab) item 3 of list b
~;

The above can be done with either perl-mode or cperl-mode by hitting
the space key multiple times.  I would hope to be able to use the tab
key to indent up to the column of where text of the previous line
starts.

I'm using emacs version GNU Emacs 22.1.1.

Thanks in advance for any comments.

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Perl mode multiple line quote (qq)
  2008-04-29 15:39 Perl mode multiple line quote (qq) L. D. James
@ 2008-05-02 15:11 ` Xah
  2008-05-02 22:08   ` L. D. James
  0 siblings, 1 reply; 3+ messages in thread
From: Xah @ 2008-05-02 15:11 UTC (permalink / raw)
  To: help-gnu-emacs

On Apr 29, 8:39 am, "L. D. James" <lja...@apollo3.com> wrote:
> Does anyone know of a setting for cperl-mode (or perl-mode) that will
> add the feature to allow hitting the tab key to indent when using
> multiple quoted lines such as:
>
> print qq~
> (tab) This is a tabulated list.
> (tab)(tab) item #1
> (tab)(tab) item #2
> (tab) This is list B
> (tab)(tab) Item 2 of list b
> (tab)(tab) item 3 of list b
> ~;
>
> The above can be done with either perl-mode or cperl-mode by hitting
> the space key multiple times.  I would hope to be able to use the tab
> key to indent up to the column of where text of the previous line
> starts.

I imagine the easiest way is to switch to python-mode.

You could assign f8 key so it toggles between python and perl mode.
Once in python mode, you could then tab like what you want above.
(don't really need python mode. fundamental-mode will also do, you
could also try text-mode)

  Xah
  xah@xahlee.org
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Perl mode multiple line quote (qq)
  2008-05-02 15:11 ` Xah
@ 2008-05-02 22:08   ` L. D. James
  0 siblings, 0 replies; 3+ messages in thread
From: L. D. James @ 2008-05-02 22:08 UTC (permalink / raw)
  To: help-gnu-emacs

On May 2, 11:11 am, Xah <xah...@gmail.com> wrote:
> I imagine the easiest way is to switch to python-mode.
>
> You could assign f8 key so it toggles between python and perl mode.
> Once in python mode, you could then tab like what you want above.
> (don't really need python mode. fundamental-mode will also do, you
> could also try text-mode)

Amazing, Xah.  I can't see how I couldn't have though of that.  It
works great!

Thanks.

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-02 22:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29 15:39 Perl mode multiple line quote (qq) L. D. James
2008-05-02 15:11 ` Xah
2008-05-02 22:08   ` L. D. James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).