help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h-e-w] key-binding: C-s and ESC


From: Daniel Hegyi
Subject: Re: [h-e-w] key-binding: C-s and ESC
Date: Fri, 08 Nov 2002 20:15:19 +0000

Thanks, that worked.

I really don't care much about other Emacs users feeling at home or not in my environment. I gave up on this aspect a long time ago. (My current .emacs is approximately 165 KB gigantic, unfortunately.) On the other hand, I do care about win users coming to my machine, having to edit some txt or JSP file and not being able to save stuff. ESC, C-s, C-f and a few other keystrokes are so standard on Windows that I'd much rather conform to most win apps and make my life easier than remembering two sets of shortcuts for each task, depending on the app.

Regards,
Daniel



>I'd like to replace the standard C-s shortcut for
>isearch-forward-regexp with C-f ...

Note that C-s is normally bound to isearch-forward,
not isearch-forward-regexp.  The latter is normally
bound to C-M-s.  But they both use the same keymap.

>However, I don't know how to assign the "find next"
>functionality that gets triggered when I press C-s
>again to the C-f key binding. Does anybody know how
>to do that?

Once you get into isearch mode, the keymap being used
is isearch-mode-map.  You need to define your
alternative to C-s in there too.  You need:

(define-key isearch-mode-map "\C-f" 'isearch-repeat-forward)

It is probably OK to leave C-s defined as it is in
isearch-mode-map; but if you want to cancel that:

(define-key isearch-mode-map "\C-s" nil)


I really do not recommend messing with these bindings.
C-s for isearch is so fundamental to emacs that
departing from normal here is going to cause problems
if you should ever become a big user of emacs.  C-f
for forward-char is also very fundamental.  Other
folks familiar with emacs will have difficulty using
yours if you change such things.  (You can usually get
away with modifying some of the less frequently used
bindings without too much trouble.)

(When I started using emacs a couple decades ago, I
was an experienced user of DEC's EDT editor.  There
was an EDT package for emacs which modified key
bindings to work like EDT.  After operating that way
for years, I eventually realized that I was working at
cross purposes with emacs and that I should have tried
to learn the standard emacs key bindings.  I had a
break from emacs for a couple years; and, when I
resumed using it, I bit the bullet and ditched my EDT
emulation package.  It was worth it!)

Interestingly, I have defined C-f in my own
isearch-mode-map; but, in my case, it is to add a
single character after point to the search string
(analogous to C-w, but less greedy).  Even more useful
is my C-b which removes a single character (because
C-w is sometimes _too_ greedy).

Regards,
  David V.


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail





reply via email to

[Prev in Thread] Current Thread [Next in Thread]