all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Making Backspace Work Like VI
@ 2009-12-04 19:09 deech
  2009-12-04 19:13 ` deech
  2009-12-05  3:04 ` LanX
  0 siblings, 2 replies; 10+ messages in thread
From: deech @ 2009-12-04 19:09 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,
In Vi, in insert mode, backspace does the same thing as the left
arrow, and every keystroke overwrites a character. Is there a similar
"replace mode" in emacs?

thanks ...
-deech


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Making Backspace Work Like VI
  2009-12-04 19:09 Making Backspace Work Like VI deech
@ 2009-12-04 19:13 ` deech
  2009-12-04 20:08   ` Richard Riley
                     ` (2 more replies)
  2009-12-05  3:04 ` LanX
  1 sibling, 3 replies; 10+ messages in thread
From: deech @ 2009-12-04 19:13 UTC (permalink / raw)
  To: help-gnu-emacs

Ok, I found overwrite-mode which replaces text instead of inserting.
But how do I make backspace move left instead of deleting?

thanks ...
-deech

On Dec 4, 1:09 pm, deech <aditya.si...@gmail.com> wrote:
> Hi all,
> In Vi, in insert mode, backspace does the same thing as the left
> arrow, and every keystroke overwrites a character. Is there a similar
> "replace mode" in emacs?
>
> thanks ...
> -deech



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Making Backspace Work Like VI
  2009-12-04 19:13 ` deech
@ 2009-12-04 20:08   ` Richard Riley
  2009-12-04 20:17   ` Giorgos Keramidas
       [not found]   ` <mailman.12204.1259957364.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 10+ messages in thread
From: Richard Riley @ 2009-12-04 20:08 UTC (permalink / raw)
  To: help-gnu-emacs



deech <aditya.siram@gmail.com> writes:

> Ok, I found overwrite-mode which replaces text instead of inserting.
> But how do I make backspace move left instead of deleting?

Bind "backspace" to (backward-char).

e.g

(global-set-key (kbd "<backspace>") 'backward-char)

Yuck!

As a point I think its generally a bad idea to try and use the use cases
from one editor in another as before you know it you have a Frankenstein
editor which doesn't know what it is :-)

>
> thanks ...
> -deech
>
> On Dec 4, 1:09 pm, deech <aditya.si...@gmail.com> wrote:
>> Hi all,
>> In Vi, in insert mode, backspace does the same thing as the left
>> arrow, and every keystroke overwrites a character. Is there a similar
>> "replace mode" in emacs?
>>
>> thanks ...
>> -deech
>

-- 





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Making Backspace Work Like VI
  2009-12-04 19:13 ` deech
  2009-12-04 20:08   ` Richard Riley
@ 2009-12-04 20:17   ` Giorgos Keramidas
  2009-12-05  8:04     ` Kevin Rodgers
       [not found]     ` <mailman.12258.1260000313.2239.help-gnu-emacs@gnu.org>
       [not found]   ` <mailman.12204.1259957364.2239.help-gnu-emacs@gnu.org>
  2 siblings, 2 replies; 10+ messages in thread
From: Giorgos Keramidas @ 2009-12-04 20:17 UTC (permalink / raw)
  To: help-gnu-emacs

On Fri, 4 Dec 2009 11:13:09 -0800 (PST), deech <aditya.siram@gmail.com> wrote:
> Ok, I found overwrite-mode which replaces text instead of inserting.
> But how do I make backspace move left instead of deleting?

You could install a new local keymap when overwrite-mode is enabled and
bind backspace to 'backward-char.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Making Backspace Work Like VI
       [not found]   ` <mailman.12204.1259957364.2239.help-gnu-emacs@gnu.org>
@ 2009-12-04 21:37     ` deech
  0 siblings, 0 replies; 10+ messages in thread
From: deech @ 2009-12-04 21:37 UTC (permalink / raw)
  To: help-gnu-emacs


> As a point I think its generally a bad idea to try and use the use cases
> from one editor in another as before you know it you have a Frankenstein
> editor which doesn't know what it is :-)

Yes ... well, I drank that Kool-Aid with my first "M-x". :)

Thanks for the help.
-deech



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Making Backspace Work Like VI
  2009-12-04 19:09 Making Backspace Work Like VI deech
  2009-12-04 19:13 ` deech
@ 2009-12-05  3:04 ` LanX
  1 sibling, 0 replies; 10+ messages in thread
From: LanX @ 2009-12-05  3:04 UTC (permalink / raw)
  To: help-gnu-emacs

On 4 Dez., 20:09, deech <aditya.si...@gmail.com> wrote:
> In Vi, in insert mode, backspace does the same thing as the left
> arrow, and every keystroke overwrites a character. Is there a similar
> "replace mode" in emacs?

Deech,

 you may be interested to test

M-x viper-mode

Cheers
  rolf


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Making Backspace Work Like VI
  2009-12-04 20:17   ` Giorgos Keramidas
@ 2009-12-05  8:04     ` Kevin Rodgers
       [not found]     ` <mailman.12258.1260000313.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Kevin Rodgers @ 2009-12-05  8:04 UTC (permalink / raw)
  To: help-gnu-emacs

Giorgos Keramidas wrote:
> On Fri, 4 Dec 2009 11:13:09 -0800 (PST), deech <aditya.siram@gmail.com> wrote:
>> Ok, I found overwrite-mode which replaces text instead of inserting.
>> But how do I make backspace move left instead of deleting?
> 
> You could install a new local keymap when overwrite-mode is enabled and
> bind backspace to 'backward-char.

Local keymaps are for major modes.  For minor modes like overwrite-mode,
use minor-mode-map-alist.

-- 
Kevin Rodgers
Denver, Colorado, USA





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Making Backspace Work Like VI
       [not found]     ` <mailman.12258.1260000313.2239.help-gnu-emacs@gnu.org>
@ 2009-12-05 14:16       ` deech
  2009-12-06 14:46         ` Kevin Rodgers
  0 siblings, 1 reply; 10+ messages in thread
From: deech @ 2009-12-05 14:16 UTC (permalink / raw)
  To: help-gnu-emacs

On Dec 5, 2:04 am, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote:
> Giorgos Keramidas wrote:
> > On Fri, 4 Dec 2009 11:13:09 -0800 (PST), deech <aditya.si...@gmail.com> wrote:
> >> Ok, I found overwrite-mode which replaces text instead of inserting.
> >> But how do I make backspace move left instead of deleting?
>
> > You could install a new local keymap when overwrite-mode is enabled and
> > bind backspace to 'backward-char.
>
> Local keymaps are for major modes.  For minor modes like overwrite-mode,
> use minor-mode-map-alist.
>
> --
> Kevin Rodgers
> Denver, Colorado, USA

Could you show me how to use the minor-mode-map-alist? My google
search wasn't particularly revealing.
-deech


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Making Backspace Work Like VI
  2009-12-05 14:16       ` deech
@ 2009-12-06 14:46         ` Kevin Rodgers
  2009-12-08  5:10           ` Kevin Rodgers
  0 siblings, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2009-12-06 14:46 UTC (permalink / raw)
  To: help-gnu-emacs

deech wrote:
> On Dec 5, 2:04 am, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote:
>> Giorgos Keramidas wrote:
>>> On Fri, 4 Dec 2009 11:13:09 -0800 (PST), deech <aditya.si...@gmail.com> wrote:
>>>> Ok, I found overwrite-mode which replaces text instead of inserting.
>>>> But how do I make backspace move left instead of deleting?
>>> You could install a new local keymap when overwrite-mode is enabled and
>>> bind backspace to 'backward-char.
>> Local keymaps are for major modes.  For minor modes like overwrite-mode,
>> use minor-mode-map-alist.

> 
> Could you show me how to use the minor-mode-map-alist? My google
> search wasn't particularly revealing.

Untested:

(defvar overwrite-mode-map (make-sparse-keymap))
(define-key overwrite-mode-map "<backspace>" 'backward-char)
(add-to-list 'minor-mode-map-alist  (cons 'overwrite-mode overwrite-mode-map))

-- 
Kevin Rodgers
Denver, Colorado, USA





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Making Backspace Work Like VI
  2009-12-06 14:46         ` Kevin Rodgers
@ 2009-12-08  5:10           ` Kevin Rodgers
  0 siblings, 0 replies; 10+ messages in thread
From: Kevin Rodgers @ 2009-12-08  5:10 UTC (permalink / raw)
  To: help-gnu-emacs

Kevin Rodgers wrote:
> Untested:
> 
> (defvar overwrite-mode-map (make-sparse-keymap))
> (define-key overwrite-mode-map "<backspace>" 'backward-char)

Sorry, that should be:

(define-key overwrite-mode-map (kbd "<backspace>") 'backward-char)

> (add-to-list 'minor-mode-map-alist  (cons 'overwrite-mode overwrite-mode-map))

-- 
Kevin Rodgers
Denver, Colorado, USA





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-12-08  5:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-04 19:09 Making Backspace Work Like VI deech
2009-12-04 19:13 ` deech
2009-12-04 20:08   ` Richard Riley
2009-12-04 20:17   ` Giorgos Keramidas
2009-12-05  8:04     ` Kevin Rodgers
     [not found]     ` <mailman.12258.1260000313.2239.help-gnu-emacs@gnu.org>
2009-12-05 14:16       ` deech
2009-12-06 14:46         ` Kevin Rodgers
2009-12-08  5:10           ` Kevin Rodgers
     [not found]   ` <mailman.12204.1259957364.2239.help-gnu-emacs@gnu.org>
2009-12-04 21:37     ` deech
2009-12-05  3:04 ` LanX

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.