0
votes

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

3
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

3 Answers

0
votes

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)))

0
votes

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)

0
votes

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.