Re: Keeping tab indentation of blank lines

2006-09-11 Thread Yegappan Lakshmanan
Hello, On 9/9/06, Laurent Birtz [EMAIL PROTECTED] wrote: Hello, I need help to change the default behavior of the 'autoindent' option. The doc says: Copy indent from current line when starting a new line (typing CR in Insert mode or when using the o or O command). If you do not

Re: Keeping tab indentation of blank lines

2006-09-10 Thread A.J.Mechelynck
Laurent Birtz wrote: Hello, I need help to change the default behavior of the 'autoindent' option. The doc says: Copy indent from current line when starting a new line (typing CR in Insert mode or when using the o or O command). If you do not type anything on the new line except BS

Re: Keeping tab indentation of blank lines

2006-09-10 Thread Yakov Lerner
On 9/9/06, Laurent Birtz [EMAIL PROTECTED] wrote: Hello, I need help to change the default behavior of the 'autoindent' option. The doc says: Copy indent from current line when starting a new line (typing CR in Insert mode or when using the o or O command). If you do not type

Re: Keeping tab indentation of blank lines

2006-09-10 Thread Yakov Lerner
On 9/9/06, Laurent Birtz [EMAIL PROTECTED] wrote: Hello, I need help to change the default behavior of the 'autoindent' option. The doc says: Copy indent from current line when starting a new line (typing CR in Insert mode or when using the o or O command). If you do not type

Re: Keeping tab indentation of blank lines

2006-09-10 Thread Laurent Birtz
Can you try this to see whether it does what you want ?: :imap Enter Enterspacebs I get the following behavior: When I press 'o', it starts an empty line correctly indented. If I press 'escape' immediately, the indentation is removed and the cursor moves to column 1. If I press

Re: Keeping tab indentation of blank lines

2006-09-10 Thread Yakov Lerner
On 9/10/06, Laurent Birtz [EMAIL PROTECTED] wrote: Can you try this to see whether it does what you want ?: :imap Enter Enterspacebs I get the following behavior: When I press 'o', it starts an empty line correctly indented. If I press 'escape' immediately, the indentation is

Re: Keeping tab indentation of blank lines

2006-09-10 Thread Benjamin Esham
Yakov Lerner wrote: Laurent Birtz wrote: When I press 'o', it starts an empty line correctly indented. If I press 'escape' immediately, the indentation is removed and the cursor moves to column 1. If I press 'enter' instead, the indentation is removed for the first line, but the

Re: Keeping tab indentation of blank lines

2006-09-10 Thread Yakov Lerner
On 9/10/06, Benjamin Esham [EMAIL PROTECTED] wrote: Yakov Lerner wrote: Laurent Birtz wrote: When I press 'o', it starts an empty line correctly indented. If I press 'escape' immediately, the indentation is removed and the cursor moves to column 1. If I press 'enter' instead, the

Re: Keeping tab indentation of blank lines

2006-09-10 Thread Yakov Lerner
On 9/10/06, Benjamin Esham [EMAIL PROTECTED] wrote: I get this behavior with 7.0.94, but it's done this for as long as I can remember (I've been using Vim since 6.2, I think). Some RedHat-8-based appliences around here have vim 6.1 :-) Yakov

Re: Keeping tab indentation of blank lines

2006-09-10 Thread Laurent Birtz
Yes with these two mappings mentioned earlier in this thread, all lines are indented after oEnterEnterEnter: :inoremap Enter Enterspacebs :nnoremap o ospacebs Got it! With these two mappings, it works correctly. Apparently on my system (vim version 6.4,

Re: Keeping tab indentation of blank lines

2006-09-10 Thread A.J.Mechelynck
Benjamin Esham wrote: Yakov Lerner wrote: Laurent Birtz wrote: When I press 'o', it starts an empty line correctly indented. If I press 'escape' immediately, the indentation is removed and the cursor moves to column 1. If I press 'enter' instead, the indentation is removed for the first

Re: Keeping tab indentation of blank lines

2006-09-10 Thread A.J.Mechelynck
Laurent Birtz wrote: Yes with these two mappings mentioned earlier in this thread, all lines are indented after oEnterEnterEnter: :inoremap Enter Enterspacebs :nnoremap o ospacebs Got it! With these two mappings, it works correctly. Apparently on my system

Re: Keeping tab indentation of blank lines

2006-09-10 Thread Laurent Birtz
:imap o ospacebs means add a space and delete it whenever you insert a lowercase o in _Insert_ mode. This creates an undo point after each lowercase o, which is probably not what you want. See :map-overview Eep! Indeed. I'm a vim newbie and I didn't RTFM properly. Thanks! Laurent Birtz

Keeping tab indentation of blank lines

2006-09-09 Thread Laurent Birtz
Hello, I need help to change the default behavior of the 'autoindent' option. The doc says: Copy indent from current line when starting a new line (typing CR in Insert mode or when using the o or O command). If you do not type anything on the new line except BS or CTRL-D and then type

Re: Indentation and blank lines

2006-05-09 Thread Jürgen Krämer
Hi Arménio Pinto wrote: I'm using Vim to edit Java code. There's an annoying behavior that I would like to fix, but haven't had any success yet. The problem is that the indentation disappears when you insert blank lines. For example (and suppose that the » it's a tab): Vim does...

RE: Indentation and blank lines

2006-05-09 Thread Arménio Pinto
It works, thanks! Isn't this a kind of nasty trick? :-) Does anyone know a cleaner solution? Arménio Pinto -Original Message- From: Jürgen Krämer [mailto:[EMAIL PROTECTED] Sent: terça-feira, 9 de Maio de 2006 16:04 To: vim mailing list Subject: Re: Indentation and blank lines Hi

Re: Indentation and blank lines

2006-05-09 Thread John Love-Jensen
Hi Arménio, Isn't this a kind of nasty trick? :-) Does anyone know a cleaner solution? That is the clean, simple solution. The nasty solution is to modify the Vim source code, change the behavior of auto-indent to your preference, and rebuild. Sincerely, --Eljay

RE: Indentation and blank lines

2006-05-09 Thread Gerald Lai
On Tue, 9 May 2006, Arm?nio Pinto wrote: -Original Message- From: J?rgen Kr?mer [mailto:[EMAIL PROTECTED] Sent: ter?a-feira, 9 de Maio de 2006 16:04 To: vim mailing list Subject: Re: Indentation and blank lines Hi Arm?nio Pinto wrote: I'm using Vim to edit Java code

RE: Indentation and blank lines

2006-05-09 Thread Arménio Pinto
Ok, I trust you guys! Thanks for all the help! Arménio Pinto -Original Message- From: Gerald Lai [mailto:[EMAIL PROTECTED] Sent: terça-feira, 9 de Maio de 2006 17:37 To: Arménio Pinto Cc: vim mailing list Subject: RE: Indentation and blank lines On Tue, 9 May 2006, Arménio Pinto wrote