Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Deleting previous characters in vi(m) in insert mode

4 views
Skip to first unread message

Thomas Wiedmann

unread,
Sep 26, 2009, 6:05:48 AM9/26/09
to
Hello,

how can in vi(m) in the insert mode previous characters be deleted without
changing to the command mode?
The problem: [Backspace] is not always working in the insert mode - whyever.

Thomas Wiedmann

Mikolaj Machowski

unread,
Sep 26, 2009, 6:31:50 AM9/26/09
to
Thomas Wiedmann scripsit:

Ctrl-H

m.
--
LaTeX + Vim = http://vim-latex.sourceforge.net/
Vim Universal Templates: http://vim.sf.net/script.php?script_id=1078
CLEWN - http://clewn.sf.net

Christian Brabandt

unread,
Sep 26, 2009, 7:18:17 AM9/26/09
to

You already got an answer. Besides <C-H>, for deleting one char you
can also use <C-W> for deleting a word and <C-U> for deleting the
whole line.

See :h i_CTRL-H
:h i_CTRL-W
:h i_CTRL-U

And if your backspace key is not working, you probably want to take a
look at :h :fixdel and :h 'bs'

regards,
Christian
--
It's been said you aren't a real UNIX system administrator until you've
edited a sendmail.cf file. It's also been said that you are crazy if you
attempted to do so twice.

Gary Johnson

unread,
Sep 26, 2009, 7:56:38 PM9/26/09
to
Christian Brabandt <cb-...@256bit.org> wrote:
> On 2009-09-26, Thomas Wiedmann <th...@gmx.de> wrote:
> > how can in vi(m) in the insert mode previous characters be deleted
> > without changing to the command mode?
> > The problem: [Backspace] is not always working in the insert mode - whyever.
>
> You already got an answer. Besides <C-H>, for deleting one char you
> can also use <C-W> for deleting a word and <C-U> for deleting the
> whole line.
>
> See :h i_CTRL-H
> :h i_CTRL-W
> :h i_CTRL-U
>
> And if your backspace key is not working, you probably want to take a
> look at :h :fixdel and :h 'bs'

It may help also to look at

:help 'backspace'

--
Gary Johnson

Christian Brabandt

unread,
Sep 27, 2009, 3:07:41 AM9/27/09
to
On 2009-09-26, Gary Johnson <gary...@eskimo.com> wrote:

> Christian Brabandt <cb-...@256bit.org> wrote:
>> And if your backspace key is not working, you probably want to take
>> a look at :h :fixdel and :h 'bs'
>
> It may help also to look at
>
> :help 'backspace'

Which is the same as :h 'bs' ;)

regards,
Christian
--
Kernel panic: Could not determine whether
bit was one, zero or sqrt(1/PI)...
(J.K. in d-u-g)

Florian Rehnisch

unread,
Oct 4, 2009, 11:17:17 AM10/4/09
to
o Thomas Wiedmann <th...@gmx.de>:

> how can in vi(m) in the insert mode previous characters be deleted without
> changing to the command mode?

Do you know CTRL-O? It takes one normal mode comand and then goes
back to insert mode. Limited to Vim, however.
--
flori
Vim-Hilfe auf Deutsch http://www.florianrehnisch.de/vimhelp/

Thomas Wiedmann

unread,
Oct 17, 2009, 6:44:35 AM10/17/09
to
> See :h i_CTRL-H
> :h i_CTRL-W
> :h i_CTRL-U
>
> And if your backspace key is not working, you probably want to take a
> look at :h :fixdel and :h 'bs'

These key shortcuts only work with vim, not with vi [Ok, my initial question
concerned vi(m)]. How can with vi (version 3.10) in the insert mode previous

characters be deleted without
changing to the command mode?

Thomas Wiedmann

Christian Brabandt

unread,
Oct 17, 2009, 7:52:57 AM10/17/09
to

Actually they should work on any vi clone. The problem is, that you
usually can only delete characters up to the point where you start
insert mode. In vim :set bs=2 fixes that, I am not sure, if vi or nvi or
the other clones have a setting for that.

regards,
Christian

0 new messages