How can you set the syntax of a .txt file .tex in Emacs?
+7
A:
For questions like this, you should refer to other resources like the EmacsWiki.
In your .emacs
, you could do something like:
(setq auto-mode-alist
(append '(("\\.txt$" . tex-mode))
auto-mode-alist))
Also, you could change the modeline of the current buffer using:
M-x tex-mode
popcnt
2009-03-13 02:38:46
+5
A:
You can also put the following at the start of the file:
% -*- TeX -*-
That will signal to emacs that your file should be in tex-mode.
chradcliffe
2009-03-13 14:40:35