1

How can I make latex-mode to apply to files with .tikz extension in Emacs? (I am using Auctex)

passerby51
  • 835
  • 2
  • 9
  • 23
  • 1
    possible duplicate of [How to tell emacs to open .h file in C++ mode?](http://stackoverflow.com/questions/3312114/how-to-tell-emacs-to-open-h-file-in-c-mode) – François Févotte Apr 04 '13 at 06:46

1 Answers1

3

You can run M-x latex-mode in the file buffer. If you want to automatically do this for every file you visit add the following to .emacs,

 (setq auto-mode-alist
     (append
         '(("\\.tikz\\'" . latex-mode))
          auto-mode-alist))

auto-mode-alist is a list of file types and the mode to apply as you may have guessed. You can run C-h v auto-mode-alist to get a description of the variable for your emacs.

Stefan
  • 27,908
  • 4
  • 53
  • 82
artless noise
  • 21,212
  • 6
  • 68
  • 105