ctrlf
ctrlf copied to clipboard
Perform multiple searches in parallel when multiple-cursors is active
Currently, I'm using phi-search for its integration with multiple-cursors. Is there an easy way to extend ctrlf to also support multiple cursors? For now, I've employed this hack:
(defmacro ctrlf-or-phi (key phi-version ctrlf-version)
"Call ctrlf unless multiple cursors are active, in which case call phi"
`(global-set-key (kbd ,key)
#'(lambda () (interactive)
(if multiple-cursors-mode
(,phi-version) (,ctrlf-version)))))
(ctrlf-or-phi "C-s" phi-search ctrlf-forward)
(ctrlf-or-phi "C-r" phi-search-backward ctrlf-backward)
There's not an easy way; that sounds like quite a complex feature. If somebody were to make CTRLF extensible in a clean way so that the feature could be implemented, I would accept a pull request. However, I do not anticipate working on it anytime soon.