| Computers Forum Index » Computer - Editors » CTRL-U in insert mode and indent... |
|
Page 1 of 1 |
|
| Author |
Message |
| Andrei Voropaev... |
Posted: Fri Sep 25, 2009 11:56 am |
|
|
|
Guest
|
Hello!
I've recently updgraded vim to version 7.2 with patches 1-182 and
noticed that Ctrl-U in insert mode started to work differently. In my
setup hitting "o" in command mode puts indented comment characters at
the beginning of the new line if my current line belongs to comment
(formatoptions=croql). Previously at this point I could hit Ctrl-u and
the inserted comment character would be removed and the cursor would be
placed at the correct indentation level. Now the cursor is always placed
at the beginning of line. I've tried to change option backspace to
"start,eol" but it didn't play any role.
Any hints on how can I get the old behaviour back?
--
Minds, like parachutes, function best when open |
|
|
| Back to top |
|
|
|
| Gary Johnson... |
Posted: Fri Sep 25, 2009 11:44 pm |
|
|
|
Guest
|
Andrei Voropaev <avorop at (no spam) mail.ru> wrote:
Quote: Hello!
I've recently updgraded vim to version 7.2 with patches 1-182 and
noticed that Ctrl-U in insert mode started to work differently. In my
setup hitting "o" in command mode puts indented comment characters at
the beginning of the new line if my current line belongs to comment
(formatoptions=croql). Previously at this point I could hit Ctrl-u and
the inserted comment character would be removed and the cursor would be
placed at the correct indentation level. Now the cursor is always placed
at the beginning of line. I've tried to change option backspace to
"start,eol" but it didn't play any role.
Any hints on how can I get the old behaviour back?
I don't seem to have anything newer than 7.2.148, but it works fine for
me. I tried it like this:
vim -N -u NONE
:filetype indent on
:e foo.cpp
:set fo=croql
where foo.cpp is a non-existent file. Then I created a function with a
few indented comment lines and repeated your problem description.
Ctrl-U cleared the leading "// " and move the cursor to where the "// "
began.
Maybe you have a new mapping set. Try executing this:
:map!
--
Gary Johnson |
|
|
| Back to top |
|
|
|
| Andrei Voropaev... |
Posted: Tue Sep 29, 2009 8:26 am |
|
|
|
Guest
|
On 2009-09-25, Gary Johnson <garyjohn at (no spam) eskimo.com> wrote:
Quote:
I don't seem to have anything newer than 7.2.148, but it works fine for
me. I tried it like this:
vim -N -u NONE
:filetype indent on
:e foo.cpp
:set fo=croql
I've tried this on my machine. The cursor goes to the position 0 in the
line, not to where the '//' began.
Quote: Maybe you have a new mapping set. Try executing this:
:map!
Here's what I got.
i <F12> at (no spam) <Esc>o/
i <F11> at (no spam) /*<Esc>o
! <S-Insert> <C-R>*
Hm. Maybe it's some patch from gentoo? :)
--
Minds, like parachutes, function best when open |
|
|
| Back to top |
|
|
|
|