jed-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Paragraph reformatting functionality


On Wed, Jan 18, 2006 at 08:21:14PM +0000, Roey Katz wrote:
> HI!
> 
> It's so wonderful to have found this mailing list.  I've been using Jed 
> for years now, since '00 at least.  I wanted to know if it's possible (and 
> if so, how) to do the following:
> 
> 
> - I want to bind format_paragraph to a key (say, CTRL+semicolon, like 
> "^;")
> 

First do Help/Describe Key Bindings.  You may find that
format_paragraph is already bound to a convenient key.

If not, put the following in your .jedrc file:

    setkey("format_paragraph", "^X;");

Then, change the key, to the key of your choice.  Examples:

- "^X;" -- Ctrl-X followed by semicolon key.

- "\e;" -- Alt-; (Alt and semicolon at the same time)

I don't know how to bind to the key Ctrl-;.  Perhaps someone else
can answer that one.  It would be nice if we had a table or set of
rules that tell us what rules to use in order to bind special keys.

format_paragraph does the things that you are asking for, but
perhaps not as automatically as you want.  I use lots of hanging
indents, and Jed is super at formatting them.

See below.

> - I want a format_paragraph that formats the paragraph according to the 
> indentation of the first line of the paragraph.  Currently, if I call m-x 
> format_pagraph in the second line of a paragraph, and that second line 
> starts from column 0 (where the first line starts on column 2, say) then 
> the entire paragraph is reformatted to start from column 0.

Put the cursor on the first line of the paragraph, then do
format_pagraph.

> 
> - I want to make it so this new format_paragraph could format paragraphs 
> which start out with bullets or hyphens or numberings* to have a hanging 
> indent.  That is, I want this:
> 
>   - this is an item.  It goes on and on and on and on and on and on and on 
> and on and on and on and on.
>   - this is another item. It, too goes on and on and on and on and on and 
> on and on and on and on.
> 
> to look like this:
> 
>   - this is an item.  It goes on and on and on and on and on and on and on
>     and on and on and on and on.
>   - this is another item. It, too goes on and on and on and on and on and
>     on and on and on and on.
> 

Indent the second line manually (space bar, backspace, whatever),
then with the cursor on the second line, do format_paragraph.

> from anywhere that I press that ^; button.

It works, but you need to put the cursor on the second or
following line of the hanging indent.

In general, put the cursor on a line with the level of indentation
you want.

Dave

[snip]

-- 
Dave Kuhlman
http://www.rexx.com/~dkuhlman

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]