Emacs: Single Key for isearch

one of the key i use the most often is isearch.

if you want a single key to do isearch, you can define it this way.

(global-set-key (kbd "<f8>") 'isearch-backward)
(global-set-key (kbd "<f9>") 'isearch-forward)

(defun xah-isearch-hook ()
  "Hook for `isearch-mode-hook' "
  (define-key isearch-mode-map (kbd "<f8>") 'isearch-repeat-backward)
  (define-key isearch-mode-map (kbd "<f9>") 'isearch-repeat-forward)

(add-hook 'isearch-mode-hook 'xah-isearch-hook)

See: How to Override Keybindings in Emacs.

Popular posts from this blog

Browser User Agent Strings 2012

11 Years of Writing About Emacs

does md5 creates more randomness?