1

How can I get information about what mode a certain buffer is in in emacs. For example when I'm in buffer x how can i find ut if it is actually view-mode or whatever else it might be. The reason I want this is so that I can customize evil mode to only the buffers where I want it using:

(add-to-list 'evil-insert-state-modes 'view-mode)

The problem is that I don't know what the names are of the actual different modes I want to add to this list.

1 Answer 1

4

Hit M-: and type major-mode. You'll see the name of the major mode of the current buffer in the echo area.

2
  • Nice, now evil starts to make more sense! Oct 29, 2014 at 16:02
  • 2
    Or just use C-h v major-mode, which gives you completion. (This shows you not just the value but what the variable major-mode is for.)
    – Drew
    Oct 30, 2014 at 1:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.