On Oct 23, 2:03 am, Jürgen Krämer <[EMAIL PROTECTED]> wrote:
>
> the 'I'-flag in 'cpoptions' only keeps the current indent if you leave
> the line by pressing cursor-up or cursor-down. If you press enter the
> indent is removed. The only working solution I know of is to
>
> :inoremap <cr> x<bs><cr>
>
> Regards,
> Jürgen
>
I thought I remembered reading somewhere in the help that moving the
cursor within the line also caused the indent to not be deleted, so
the following would work and is _slightly_ less hackish (because it
doesn't actually modify the buffer):
inoremap <cr> <left><right><cr>
inoremap <esc> <left><right><esc>
This works by experimentation in MSWindows' gvim 7.2.25, but I can't
seem to find this fact in the help documents. If somebody else can
find it, please inform me of the location! Otherwise, I'm not sure if
it will work in general.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---