org-edit-special and editing code in org mode

One of the new funny things I found in emacs is org-edit-special.

I keep my config files on GitHub in an org mode file.

Since I am in an org mode the snippets and indentation and all the stuff are from org mode major mode which is a pain in the ass. For that purpose: org-edit-special to the rescue!

If we have an org mode file like the following:

You can place the cursor inside the BEGIN-END block and press C-c ' to invoke org-edit-special. Then you will open a new window where you can edit the code in the proper major mode with all your awesome customizations and snippets in place.

Happy coding!

Leave a Reply

Your email address will not be published. Required fields are marked *