universal-ctags / citre

A superior code reading & auto-completion tool with pluggable backends.
GNU General Public License v3.0
337 stars 26 forks source link

Jump back without `citre-jump-back` #68

Closed kaiwk closed 3 years ago

kaiwk commented 3 years ago

For those who use Citre with other tools (imenu, grep...):

;;; jump back enhancement
(defun my--add-point-to-find-tag-marker-ring (&rest r)
  (xref-push-marker-stack (point-marker)))
(dolist (func '(find-function
                counsel-imenu
                helm-imenu
                projectile-grep
                helm-grep-ag
                counsel-rg
                lsp-ivy-workspace-symbol
                citre-jump))
  (advice-add func :before 'my--add-point-to-find-tag-marker-ring))

You can jump back with any of them using M-,.

AmaiKinono commented 3 years ago

Great! Could you write this in the wiki?

kaiwk commented 3 years ago

Done