highlight-symbol.el icon indicating copy to clipboard operation
highlight-symbol.el copied to clipboard

Is it possible to highlight selection

Open ChoppinBlockParty opened this issue 5 years ago • 2 comments

I wonder if there is an option to highlight selection. I think that would be super helpful. I am using evil, is it possible to highlight pattern selected in visual mode?

ChoppinBlockParty avatar Sep 17 '18 10:09 ChoppinBlockParty

try this:

(defadvice highlight-symbol-get-symbol (around my-highlight-symbol-get-symbol activate)
  (if (use-region-p)
      (setq ad-return-value (buffer-substring (region-beginning) (region-end)))
    ad-do-it
    )
  )

lynnux avatar Nov 03 '21 02:11 lynnux

try this:

(defadvice highlight-symbol-get-symbol (around my-highlight-symbol-get-symbol activate)
  (if (use-region-p)
      (setq ad-return-value (buffer-substring (region-beginning) (region-end)))
    ad-do-it
    )
  )

it does not work in spacemacs. I don't know why.

SadSock avatar Dec 25 '21 07:12 SadSock