Emacs: syntax highlight for non-code files -
let's suppose want create file (using emacs) explain programming. example, mylib-tutorial.txt.
is there way turn on syntax highlight on specific parts of file containing code?
for example:
tutorial --------- call behaves follow: void foo(&resource); call provoke huge stack overflow , of personal files permanent lost (a copy police sent, though).
is there way turn on syntax highlight code sample? org-mode perhaps?
enable org-src-fontify-natively
:
(eval-after-load "org" '(setq org-src-fontify-natively t))
and use org-mode
:
* tutorial call behaves follows: #+begin_src c void foo(&resource); #+end_src call provoke huge stack overflow , of personal files permanent lost (a copy police sent, though).
you can edit src
block in c-mode
using org-edit-special
, bound c-c '
default. use c-c '
again close c-mode
buffer , update org buffer.
Comments
Post a Comment