Disable auto-indent on enter within preserve space elements

Are you missing a feature? Request its implementation here.
burto
Posts: 20
Joined: Wed Feb 09, 2005 10:15 pm

Disable auto-indent on enter within preserve space elements

Post by burto »

I find it annoying that oxygen will insert indentation when enter is hit within a space preserving element (such as programlisting in docbook). Is it possible to have a preference that disables the automatic indentation when enter is entered within such elements?

Thanks,

Mark
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

I think usually the text in such an element, for example a code fragment entered in a programlisting, is also indented. In your case maybe there are several lines that must not be indented but that is a very particular case and not a reason to introduce a new preference. Is it so annoying to just delete 2 or 4 spaces inserted automatically inside a space preserving element ?

Best regards,
Sorin
dnedrow
Posts: 60
Joined: Wed Jan 28, 2004 10:51 pm

Post by dnedrow »

sorin wrote:Hello,

I think usually the text in such an element, for example a code fragment entered in a programlisting, is also indented.
I think that's the problem he's talking about. Eg. if you paste in a block of C code that has staggered indenting (normal), the hit Enter, every line becomes left aligned. Not what you would want.

-David
burto
Posts: 20
Joined: Wed Feb 09, 2005 10:15 pm

Post by burto »

What I would like is that within a space preserving section, hitting the enter key moves the cursor to the start of the next line and not indenting it with respect to the surrounding elements. The indentation of the surrounding elements is meaningless as far as the contents of the programlisting or whatever space preserving section you are working in is concerned.

Also, I don't think that linewrapping should occur in such sections either.

Regards,

Mark
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hi David,
burto wrote:I find it annoying that oxygen will insert indentation when enter is hit within a space preserving element (such as programlisting in docbook).
dnedrow wrote:I think that's the problem he's talking about. Eg. if you paste in a block of C code that has staggered indenting (normal), the hit Enter, every line becomes left aligned. Not what you would want.
Sorry if it was not clear. With the statement
sorin wrote:I think usually the text in such an element, for example a code fragment entered in a programlisting, is also indented.
I wanted to say that text typed in space preserving elements and text typed in other elements are not different because the case of no autoindentation needed when the ENTER key is pressed is very particular and not frequent. I see this as a good reason for not introducing a new preference for disabling autoindentation on ENTER in space preserving elements. For the case of pasting a block of text there is the preference Indent on paste in Preferences - Editor / Format that disables indenting of pasted text.

Best regards,
Sorin
burto
Posts: 20
Joined: Wed Feb 09, 2005 10:15 pm

Post by burto »

Looks like this got implemented in 6.1.

Much appreciated
Post Reply