0

I have the same issue with the guy, the link is below: http://comments.gmane.org/gmane.emacs.vim-emulation/1404

when I try to use xgtags/xcscope with evil I have the following question: xgtags/xcscope would open a new window with all search results and this window/buffer is in normal mode, but enter wouldn't work to go in to the source code file in the result list. I need to c-z to get to emacs mode to jump to the source file. Would it be possible to let evil go into emacs mode for result buffers of cscope and gtags? or what is your approach regarding to this issue?

But I didn't find any solution on Internet. Is there anyone know how to solve the issue?

Thanks! Jerry

  • I tried cscope and I don't have this problem: when in the *cscope* buffer, pressing «enter» takes me to the symbol definition. What is your version of emacs and evil ? I'm using the 1.0-dev installed with ELPA in Emacs24. (M-x evil-version) – Ehvince Dec 12 '13 at 10:49

3 Answers3

0

This is what works to enter evil-emacs-state when entering dired-mode (just replace with the mode used by xgtags):

(add-hook 'dired-mode-hook (lambda () (evil-emacs-state)))

put it in you .emacs or try temporarily with M-x ielm.

elemakil
  • 3,681
  • 28
  • 53
Ehvince
  • 17,274
  • 7
  • 58
  • 79
0

Ehvince, thanks very much.

But enter wouldn't work to go in to the source code file in the result list.

The following is my config:

4 ;;coscope

5 (require 'xcscope)

6 (setq cscope-do-not-update-database t)

92 ;;evil

93 (add-to-list 'load-path "~/.emacs.d/site-lisp/evil")

94 (require 'evil) 95 (evil-mode 1)

96 (add-hook 'dired-mode-hook (lambda () (evil-emacs-state)))

  • First of all, too bad for you, because it's working fine with my xcscope. Then, as I said, you have to adapt my answer. I gave the example with dired-mode (because I didn't know cscope) but cscope uses another mode. You have to discover that ! Finally, you should not have written an answer, but a comment to my answer or editing your question would have been nice. – Ehvince Dec 12 '13 at 09:31
0

Sorry, the issue is solved. Thanks, guys. I forgot to set following: (define-key evil-normal-state-map (kbd "SPC") 'cscope-show-entry-other-window)