Last active
December 26, 2015 17:59
-
-
Save sri/7191468 to your computer and use it in GitHub Desktop.
Emacs: Magit & putting a buffer under 2 different modes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some Emacs Notes after watching | |
http://www.youtube.com/watch?v=RvPFZL6NJNQ&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=7 | |
https://gist.github.com/jwiegley/5277578: | |
- Magit: in the status buffer you can highlight just the portion of the chunk you want | |
and stage only those lines in the index! | |
- Here is how to put a single buffer under 2 different modes: | |
Example: you are editing HTML and have a snippet of Javascript that you want to | |
extend. The page is in HTML mode. Clone an indirect buffer. Narrow to region on the | |
snippet you want to modify and put that in Javascript mode. Now anything you type will | |
reflect in both the buffers. An indirect buffer is one where it share only the content | |
with another buffer. All other variables like major mode, can be different. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment