Skip to content

Instantly share code, notes, and snippets.

@jonEbird
Created November 6, 2014 00:27
Show Gist options
  • Save jonEbird/c0d2793bdda8a6d68bda to your computer and use it in GitHub Desktop.
Save jonEbird/c0d2793bdda8a6d68bda to your computer and use it in GitHub Desktop.
Only use phi-search when multiple cursors is enabled
;; Allow isearch functionality with multiple-cursors
(require 'phi-search)
(setq phi-search-limit 10000)
(add-hook 'multiple-cursors-mode-enabled-hook
(lambda ()
(interactive)
(global-set-key (kbd "C-s") 'phi-search)
(global-set-key (kbd "C-r") 'phi-search-backward)))
(add-hook 'multiple-cursors-mode-disabled-hook
(lambda ()
(interactive)
(global-set-key (kbd "C-s") 'isearch-forward)
(global-set-key (kbd "C-r") 'isearch-backward)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment