Use only two functions from the package of evil things like keybinding

I want to get searchable dot functionality ("*" and "#") in emacs.

So I want to use "*" and "#" from emacs evil-mode as that is one of the suggestions. However, I don't want anything else from evil mode, just these two functions!

This is my file .emacs

:

(package-initialize)
(evil-mode 1)        ;; enable evil-mode
(global-set-key (kbd "C-*") 'evil-search-symbol-forward)
(global-set-key (kbd "C-#") 'evil-search-symbol-backward)

      

The bindings are working now, but I downloaded everything evil-mode

, so it messed up my standard emacs keyboard shortcuts like "Cy" for yank.

If I don't upload evil-mode

to file .emacs

, I get an error:

Symbol function definition is void: evil-search-symbol-forward

      

+3


source to share


2 answers


@event_jr's answer mentions highlight-symbols

that there is probably a much easier way to do what you want.

However, if you really want to use the version evil

, you can (require 'evil)

in your .emacs

file without including it (i.e. leave the command (evil-mode 1)

).



Meanwhile, the features you want are actually called evil-search-word-forward

and evil-search-word-backward

, not the version ...-symbol-...

you saw on the wiki page (which is probably out of date).

+3


source


You should use highlight symbols for jump and highlight symbols.



+1


source







All Articles