Homepage: https://github.com/lewang/generic-edit-special
Author: Le Wang
Updated:
Editing submodes html css javascript
Packages like nxhtml and mmm-mode try to to activate the "right" major mode for the current chunk of embedded code. They never worked perfectly for me. Orgmode, on the other hand, creates new buffers to edit "src" blocks. This has a similar effect to `indirect-buffers', but the buffer created is "real". This approach works very well for all major-modes. That means you can use `js2-mode' to edit javascript chunks. I find this this approach much more consistently. This hack makes the `org-edit-special' functionality available to any buffer. Currently, it recognizes chunks of javascript, css, and ruby embeddd in HTML. But it's easy to add other languages, just add them to `ges/chunk-regexps'. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.