help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Line Folding in Emacs


From: Tim X
Subject: Re: Line Folding in Emacs
Date: Thu, 16 Oct 2008 11:29:13 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

jdd <jeremiah.dodds@gmail.com> writes:

> On Oct 15, 12:19 pm, "Lorenzo Isella" <lorenzo.ise...@gmail.com>
> wrote:
>> Dear All,
>> I have looked here and there but not found exactly what I was after.
>> Say you are reading some code and then want to open a new vertical
>> windows with C-x 3.
>> How can you have emacs fold the lines in such a way that you still can
>> read you code entirely in the new window, without scrolling
>> horizontally?
>> Cheers
>>
>> Lorenzo
>
> M-x auto-fill-mode C-x-h M-x fill-region?  If the lines are too long
> you could C-u-NUMBER M-x set-fill-column and then C-x-h M-x fill-
> region again. Unless I'm reading your question incorrectly

I think you may be reading it incorrectly. The OP doesn't want to change
the way lines are broken e.g. fill the region. He just wants them
wrapped for display purposes so that he can see the whole line while
coding. Hard wrapping of the lines would destroy his code formatting. 

For the OP, check the options menu. This is an option for line wrap or
truncate long lines (it changes in emacs 23). You don't want truncate
long lines. Instead, you want long lines wrapped. In emacs 23, things
change a bit and you have two wrapping options, one to wrap at the
window border and one to wrap on the space closes to the windw border
(word wrap). That should fix your problem, but of course, you will lose
the number of lines displayed with the wrapping, so if your code lines
are very long or very indented, it will use up a lot of the window and
will likely still be difficult to read (depending on programming
language, formatting and coding style etc).

Tim


-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]