5 ms·
Ask HN: Emacs-like Incremental Search?
Is there a native macOS text editor that supports emacs-like incremental search, meaning that upon completion of the search, the cursor is left at the beginning of the match? If I search for "apple" and type "ap", the cursor should be left before/on "a" when I end the search; "ap" should not be highlighted.
- ScottBurson 10y agoThat's funny. I've used the original ITS Emacs, Zmacs (the Lisp Machine editor), MINCE, Coral Common Lisp's FRED, GNU Emacs, XEmacs, and probably a couple more Emacs clones I've forgotten, and I don't recall any of them having that behavior when searching forward. (They do leave the cursor at the beginning of the match when searching backward.) Anyway, you can get Aquamacs and customize its behavior to your liking.
- dontJudge 10y agoTo save a google search, here's an emacs customization to leave cursor at the start of the match. From http://endlessparentheses.com/leave-the-cursor-at-start-of-match-after-isearch.html http://endlessparentheses.com/leave-the-cursor-at-start-of-m... (add-hook 'isearch-mode-end-hook #'endless/goto-match-beginning) (defun endless/goto-match-beginning () "Go to the start of current isearch match. Use in `isearch-mode-end-hook'." (when (and isearch-forward (number-or-marker-p isearch-other-end) (not mark-active) (not isearch-mode-end-hook-quit)) (goto-char isearch-other-end)))
- dontJudge 10y ago>> Is there a native macOS text editor that supports emacs-like... Nothing more "emacs-like" than emacs. Turn on CUA mode if common key binds is what you're after.