Questions tagged [multiple-modes]
Editing mixed-content files with multiple major modes in the same buffer
11
questions
0
votes
2
answers
409
views
enable counsel-projectile by default
I want to enable counsel-projectile-mode by default.
I have added (counsel-projectile-mode) to .emacs file as per project's usage guide but it doesn't work; meaning projectile still uses ido for ...
4
votes
1
answer
122
views
Change AUCTeX behavior inside an environment
I am using the LaTeX markdown package to insert quick notes in my document. I would like Emacs to switch to markdown mode inside the markdown environment so it for example won't automatically re-...
2
votes
0
answers
196
views
Edit a portion of YAML file (a multi-line string) with a different mode
I'm constantly editing a big yaml file with many multi-line strings, which are BASH scripts.
In org-mode I would use something like:
#+begin_src sh
echo "cool"
#+end_src
And then just to C-c ' (org-...
0
votes
2
answers
208
views
How to get current language at point?
How can i get current programming language at current cursor.
For example, if my cursor is inside script tag, then it should return js or javascript and if it is inside style tag, then it should be ...
0
votes
0
answers
64
views
Is there a way to have multiple modes in one buffer? [duplicate]
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 ...
3
votes
1
answer
106
views
Syntactic fontification of diff hunks
I'm looking for a multiple-major-modes package that doesn't remove fontification of the host mode from its inner submodes?
I tried MMM Mode and Polymode, but they remove the initial fontification and ...
2
votes
1
answer
932
views
Custom theme based on major mode or file type
How can I customize emacs to use a different theme based on major mode or file-type? And, could it work to have different themes active in different windows?
My use case would be: have (1) one ...
2
votes
1
answer
478
views
Syntax highlighting inside HTML5 <script> tags
I was curious if there was a way to get highlighting/indentation for any JavaScript that's inside of HTML5 tags? I don't frequently use JavaScript but for a class I'm in we're working with it. I ...
5
votes
1
answer
372
views
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 ...
3
votes
1
answer
337
views
Syntax highlight embedded script
I have a bash shell script that has a fairly sizable amount of perl code in it. Is there a why to get perl syntax highlighting instead of the normal here doc coloring? Thank you for any help, I'm new ...
7
votes
1
answer
833
views
Multiple major modes in one buffer (e.g., python-mode & LaTeX-mode)
Using the LaTeX-package pythontex I one can insert python code into the latex document which is executed (and printed to your latex file if you want) if you run latex. I use auctex for editing latex ...