Skip to content

Instantly share code, notes, and snippets.

@wesdotcool
Last active December 15, 2015 13:08
Show Gist options
  • Save wesdotcool/5264721 to your computer and use it in GitHub Desktop.
Save wesdotcool/5264721 to your computer and use it in GitHub Desktop.
emacs gist-mode
This is gist was made from emacs using gist-mode.
But how do you get gist mode? Well you can either find it here:
https://github.com/defunkt/gist.el, or you can get it from marmelade
using M-x package-list-packages.
Once you have it it's pretty easy to use. The easiest way to figure it
out is to do a "M-x gist-" and let the autocomplete work it's magic!
The first time you use a command you'll have to type in your github
credentials.
You'll probably want to start with M-x gist-list. That will pop open a
buffer and list off all the gists you've already made. You can then
open them and edit them. When you save the file it will automatically
update github with your changes.
To make your own I like M-x gist-region or M-x
gist-region-private. It's pretty self explanatory, but just for
completions' sake: Make a region (usually by positioning the cursor at
the beggining, hitting C-space, then moving the cursor to the end)
then with the region selected, type M-x gist-region to create a gist!
It will then show up in your gist-list!
Within the gist-list buffer, you can execute the command M-x
gist-edit-current-description to change the description of a
gist. Alternatively you can use the shortcut and type e.
While writing your gist, don't change the mode of the buffer, because
gist-mode freaks out and won't allow you to save and upload the file
to github. Even if you change the mode back to gist-mode it still may
fail.
Happy gisting!
This is gist was made from emacs using gist-mode.
But how do you get gist mode? Well you can either find it here:
https://github.com/defunkt/gist.el, or you can get it from marmalade
using M-x package-list-packages.
Once you have it it's pretty easy to use. The easiest way to figure it
out is to do a "M-x gist-" and let the autocomplete work it's magic!
The first time you use a command you'll have to type in your github
credentials.
You'll probably want to start with M-x gist-list. That will pop open a
buffer and list off all the gists you've already made. You can then
open them and edit them. When you save the file it will automatically
update github with your changes.
To make your own I like M-x gist-region or M-x
gist-region-private. It's pretty self explanatory, but just for
completions' sake: Make a region (usually by positioning the cursor at
the beggining, hitting C-space, then moving the cursor to the end)
then with the region selected, type M-x gist-region to create a gist!
It will then show up in your gist-list!
Within the gist-list buffer, you can execute the command M-x
gist-edit-current-description to change the description of a
gist. Alternatively you can use the shortcut and type e.
While writing your gist, don't change the mode of the buffer, because
gist-mode freaks out and won't allow you to save and upload the file
to github. Even if you change the mode back to gist-mode it still may
fail.
Happy gisting!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment