Questions tagged [multiple-modes]

Editing mixed-content files with multiple major modes in the same buffer

A buffer has a single major mode chosen according to the file format. For mixed-content files, there are ways to benefit from multiple major modes.

Related tags

  • , one of the ways to switch between major modes based on context
  • , another way to switch between major modes based on context
  • , for HTML files embedded CSS, Javascript and server-side scripts

External links

11 questions
5
votes
1 answer

Ergonomic way to edit source code inside ReST or Markdown code blocks?

I often find myself writing ReST files with embedded source code examples (e.g. in .. code:: blocks or GFM-style triple-backticks; usually the embedded source code is Python). And this is always an exercise in frustration, because ReST mode has…
0
votes
0 answers

Is there a way to have multiple modes in one buffer?

This is kind of a weird question, but I have a file that's a mix of perl, text, and Bourne shell. Is there some (easy) way to have emacs switch major modes at different points in the file? Perhaps when it sees -*- Text -*- or -*- Perl -*- or…
Erik Bennett
  • 143
  • 7