gist icon indicating copy to clipboard operation
gist copied to clipboard

File language not saved back to github after editing in ST2

Open minimaldesign opened this issue 11 years ago • 45 comments

I open a Textile formatted gist, modify it, then save it.

When I look at the gist back on github, everything's fine beside for its language now set to Text instead of Textile. Is there any way to preserve the formatting?

I should mention it opens as a Textile file within ST2 just fine. It's just the saving that seems to go wrong.

Thanks!

minimaldesign avatar Nov 18 '12 15:11 minimaldesign

I noticed this issue just now. Up until now I've been saving plaintext Gists, but I wanted to change it to Markdown for one so I changed it on the website, then made and edit and updated it, only to find it had reverted the Gist back to Plaintext :( I can imagine it isn't a hard fix to implement?

brandonb927 avatar Dec 08 '12 21:12 brandonb927

I can't replicate this. Can you link a gist with which this happens?

deiga avatar Feb 15 '13 19:02 deiga

@deiga For me it happens with every gist.. Here's a screencast showing my issue: http://www.screencast.com/users/brandonb927/folders/Snagit/media/eca22434-27d7-45f0-b68d-ebfbc8991ef7

brandonb927 avatar Feb 16 '13 18:02 brandonb927

Okay, thank you for that. Was able to reproduce the steps.

You can avoid that by naming the file with the correct type in sublime. But I will investigate this now :)

deiga avatar Feb 16 '13 18:02 deiga

After some investigation it seems that the problem is in the Gist API. Files just aren't renamed over the API.

deiga avatar Feb 16 '13 19:02 deiga

Thats a shame :( Thanks for looking into it!

brandonb927 avatar Feb 16 '13 20:02 brandonb927

@brandonb927 Can you try again? I can't reproduce it now, maybe GitHud fixed this issue with API?

condemil avatar Aug 11 '13 19:08 condemil

~~:+1: I seem to be having the same issue with a CoffeeScript file.~~ Disregard user error.

Sivli-Embir avatar Aug 27 '13 01:08 Sivli-Embir

Hmm seems to be working fine again. Thanks for checking in on this! (sorry for the late response btw)

brandonb927 avatar Aug 27 '13 03:08 brandonb927

Great!

condemil avatar Aug 27 '13 19:08 condemil

I am seeing this same problem on a private gist. It's a block of HTML and I can't change it from Text to HTML. It seems to work, but after saving it's back to text.

crystalneth avatar Sep 10 '13 04:09 crystalneth

Ok, I think this is because it's preferring the filename to the user's selection. If I set the filename to end in html, it works. Should probably trust the user...

crystalneth avatar Sep 10 '13 04:09 crystalneth

The bug still exists in private gists.

07151129 avatar Nov 10 '13 12:11 07151129

I just added the ".md" to the end of the file name when I uploaded (the original in sublime doesn't even need to be saved as such) and it uploads fine, even in private gists.

BlakeJenningsJohnson avatar Nov 25 '13 17:11 BlakeJenningsJohnson

Can't change language in my public gist: https://gist.github.com/andrejsc/b2db1b18433e5cc1543a It was saved as HTML (but switched back to text), and now it won't update either.

dieselburner avatar May 07 '14 10:05 dieselburner

Was having same issue with javascript, just added the js extension and it worked. Try renaming it bootstrap_center_div.html.

yoaquim avatar May 20 '14 23:05 yoaquim

@yoaquim: thanks, changing title from Bootstrap center div to bootstrap-center-div.html helped. Now html is properly highlighted.

dieselburner avatar May 21 '14 14:05 dieselburner

I ran into this today, IIS web.config is actually XML, but it wont let me change it in gist. https://gist.github.com/blowsie/04c183c62a432f6450c9

blowsie avatar May 27 '14 08:05 blowsie

@yoaquim thanks. extensions worked

baohongfei avatar Jun 26 '14 02:06 baohongfei

@deiga's and @yoaquim's suggestions worked perfectly. Just need to add the appropriate extension in the filename.

cfxd avatar Jul 13 '14 00:07 cfxd

Not alvays is good to add extension to perl or shell scripts in linux.

mmv-ru avatar Aug 11 '14 22:08 mmv-ru

~~I think the expected behavior is that the language setting works regardless of file name/extension.~~

JVimes avatar Sep 01 '14 01:09 JVimes

I don't think this is a bug with this plugin. When creating Gist manually, if I don't specify an extension github reverts back to text, no matter what language I specify.

ianconsolata avatar Sep 11 '14 02:09 ianconsolata

Oops, I'm not where I thought I was. My issue is with Gist, itself.

JVimes avatar Sep 11 '14 02:09 JVimes

Same issue as described by others. Gist's always end up as Text for format. Chrome v37.0.2062.122

pixelbacon avatar Sep 23 '14 02:09 pixelbacon

Still not working. Using Opera 12.16 and Opera Developer 26 @ Linux Mint 17. Please, fix this. Thanks!

deekej avatar Oct 22 '14 23:10 deekej

There is definitely still a language selection issue. My gist (https://gist.github.com/gabe19/f6d0590d77909f28fd3b) keeps some of the files as "Smalltalk" even though I never selected this and the files have the .cs extension. The language will be correctly auto-selected to C# when I edit the file but it doesn't hold.

jeffgabriel avatar Jan 14 '15 14:01 jeffgabriel

I've had the same issue with some ObjC gists I've been creating, added the .m and it worked but I've got older gists with no file extension that saved fine

[Using Safari Version 8.0.2 (10600.2.5)]

AlexHedley avatar Jan 20 '15 09:01 AlexHedley

Two problems still exist for Chrome latest (public gists).

  • Unable to use custom extension. When i change file name to a xxx.conf, A javascript sets language option to Apacheconf, even if i have changed it to Nginx. then it ignores completes. syntax highlighting also
  • Language option can not be saved when we edit the gist. When in editing gists. whichever option you change the language. it just ignores & saves as "text".

risyasin avatar Mar 07 '15 14:03 risyasin

@risyasin I can confirm the second problem is also the case in Safari 8.0.4 , Mac OS X Yosemite 10.10.2.

armaneshaghi avatar Apr 07 '15 13:04 armaneshaghi