Emacs isearch symbol backwards/forwards using Ctrl-Arrows

110 Views Asked by At

How can I have Ctrl-Left/Right search forwards/backwards for the symbol under the cursor?

I can't seem to find a way to search forwards/backwards on a symbol using just a single key. Spacemacs had this functionality for a while and likely came from evil mode.

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

Turns out the package 'highlight-symbol' has this functionality. Ironically, it does not highlight the search symbol...

;; Alt-Left/Right jumps to prev/next symbol
(require 'highlight-symbol)
(global-set-key (kbd "<M-right>") 'highlight-symbol-next)
(global-set-key (kbd "<M-left>") 'highlight-symbol-prev)