Firefox / Textmate Like Search in EMACS

I’m in the process of switching text editors to using EMACS full time. I’ve got it very close to where I want it at this point but has been quite the journey.

One of the things I found the most frustrating was the search functionality, I wanted a search that functioned like firefox’s. It’s second nature to me to copy something hit C-f and C-v in succession to search for it. In EMACS you have to C-s C-y. Here’s a little something I cooked up to get more windows esque functionality with isearch.

(defun windows-isearch-hook ()
  (define-key isearch-mode-map (kbd "C-f") & 'isearch-repeat-forward)
  (define-key isearch-mode-map (kbd "RET") & 'isearch-repeat-forward)
  (define-key isearch-mode-map (kbd "<escape>") & 'isearch-exit)
  (define-key isearch-mode-map (kbd "C-S-f") & 'isearch-repeat-backward)
  (define-key isearch-mode-map (kbd "C-v") & 'isearch-yank-kill)
  (define-key isearch-mode-map (kbd "<up>") & 'isearch-ring-retreat)
  (define-key isearch-mode-map (kbd "<down>") & 'isearch-ring-advance))
(add-hook & 'isearch-mode-hook & 'windows-isearch-hook)

Additionally if you want to map the C-f key to isearch you’ll have to add this to an appropriate mode hook:

(global-set-key (kbd "C-f") & 'isearch-forward)