Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to integrate rtags with evil-jumper or evil. #559

Closed
amosbird opened this issue Jan 7, 2016 · 5 comments
Closed

Add an option to integrate rtags with evil-jumper or evil. #559

amosbird opened this issue Jan 7, 2016 · 5 comments

Comments

@amosbird
Copy link

amosbird commented Jan 7, 2016

If I understand correctly, rtags has its own jumplist. It would be nice to intergrate with evil-jumper's C-o and C-i.

@Andersbakken
Copy link
Owner

Seems like a good idea. Do you know if it simply is a matter of calling:
(evil-jumper--push) before (or after) we've moved the point?

Anders

On Thu, Jan 7, 2016 at 3:20 AM, Amos Bird notifications@github.com wrote:

If I understand correctly, rtags has its own jumplist It would be nice to
intergrate with evil-jumper's C-o and C-i


Reply to this email directly or view it on GitHub
#559.

@amosbird
Copy link
Author

amosbird commented Jan 8, 2016

@Andersbakken Here is what I've found in the cscope layer.

 (defun cscope/post-init-evil-jump ()
  (defadvice helm-cscope-find-this-symbol (before cscope/goto activate)
    (evil-jumper--push)))

I think (evil-jumper--push) may be enough. There is also a evil-jump-hook,

(defun evil-jump-hook (&optional command)
  "Set jump point if COMMAND has a non-nil :jump property."
  (setq command (or command this-command))
  (when (evil-get-command-property command :jump)
    (evil-set-jump)))

@Andersbakken
Copy link
Owner

I just added a hook that's called every time we jump somewhere that I think you could easily use for this.

E.g.

(add-hook 'rtags-jump-hook 'evil-jumper--push)

Let me know if this works and reopen if not.

@amosbird
Copy link
Author

@Andersbakken After adding (add-hook 'rtags-jump-hook 'evil-jumper--push) I can use ctrl-o to jump backward. However, ctrl-i cannot jump forward.

@amosbird
Copy link
Author

After I make emacs distinguish ctrl-i and Tab, it works correctly. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants