Code Monkey home page Code Monkey logo

atom-gist's People

Contributors

aki77 avatar dayjo avatar greenkeeperio-bot avatar solvaholic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

atom-gist's Issues

Bad credentials

Hello I am using atom-gist 0.3.1,
since I reinstalled atom a while ago, I am always getting the bad credentials error when trying to use the gist plugin.

I have my token in the token file. Here are my settings:

screen shot 2016-09-05 at 14 50 57

When I use the command line

$ curl -H "Authorization: token 0493ebc99ca05XXXXXX18564c8ceX8XX9bab9" https://api.github.com/gists/starred

my token words. Also from the issue at #6 I figured I try these two commands in the atom developer console:

atom.packages.getLoadedPackage('gist').mainModule.getToken()

as well as

require('fs').readFileSync('/Users/idf/.atom/.gist-token', 'utf8')

and they both return the correct token. On the other hand, process.env.GIST_ACCESS_TOKEN returns 'undefined'.

I am not sure what the problem is, but I've had this for a couple weeks now.

Changes required due to TextBuffer.save becoming async in Atom 1.19

Hi! Thanks for maintaining the gist package!

In Atom v1.19, we will release a major change to Atom's core text buffer data structure. As part of this change, we have made TextBuffer.save asynchronous; rather than blocking until the save is complete, it now immediately returns a Promise that resolves when the save is complete. Because of this, a few other Atom APIs that use save have similarly become async:

  • Pane.close
  • TextBuffer.save
  • TextEditor.save
  • Pane.saveItem
  • Pane.saveItemAs
  • Pane.saveActiveItem
  • Pane.saveActiveItemAs
  • Pane.saveItems
  • Workspace.saveActivePaneItem
  • Workspace.saveActivePaneItemAs

Effects on this package

We think this package could be impacted by this upgrade because it calls the changed methods in the following places:

  • TextEditor.save

We found these calls using a regex search, so this list might be incomplete, and it might contain some false positives.

What to do about the change

It should be pretty easy to adjust your package code and/or tests to work with the new async behavior, and to simultaneously keep it working with older versions of Atom. Here are some examples of pull requests we opened on our bundled packages to cope with the change:

Please let me know if you have any questions. I would be happy to help!

Gists are not being detected.

Some of the gists in my gists list are not showing up but are showing in my gist list. I've gone and deleted the gist and created it again and it appears. This has been happening to numerous gists after a period of time about month or so.

Issue with storing Github PAT in settings.json

Using this package alongside the sync-settings package, which stores your Atom settings in Gists for easy sharing between multiple Atom environments, can cause your Github Personal Access Token to be visible publicly since it is stored in Atom's setting.json.

After setting up this package today, I got a email from Github saying a PAT of mine was visible in a public gist (aka my sync-settings files), and they revoked it.

Not sure what you can do to circumvent this, but wanted to bring to your attention anyways.

About gist:list show result

hello, bigcow! nice work! when i type gist:list, the result show item make the title text as the gist file name with bold, and with the gray text of gist description below it, i feel that not so comfortable to read, maybe i had some kind of OCD, but i really hope the title can be the gist description and followed with the gist file name, could you make a setting option here please, just like the application of gisto does? 3Q

gist description
gist file name

Setting don't appear in Settings view

Maybe a regression of #2? I’m having the same issue; the options don’t show up in Settings view at all…

img

I can manually put gist: environmentName: "GITHUB_TOKEN" into config.cson, and the package then works, but Settings view still doesn't match the README screenshot, so something is amiss…

img

How to setup

What are setup instructions to use this this plugin?

Getting error message after installation:

"Error: required token"

Assume it is talking about Personal Access Token (PAT), is that right?
Can a single PAT be used across multiple plugin?
Is it better to create a unique PAT for each plugin?

Thank you.

[feature] support for multiple files

Hi Aki! I think it would be nice to handle multiple files in the same gist. This would be a great manner of manage your snippets using gists and easly search and insert them inside your code.

May I be avail to help you if you want/need. But first lemme know what you thing about it.

Thanks, see u.

Allow continued editing after save

I often save files I'm working on through habit, but when I'm editing a gist saving the file causes it to close.

To reproduce:

  1. Open the gist list
  2. Select a gist
  3. Press tab
  4. Select Edit
  5. Make some changes
  6. Press ⌘-S
  7. The gist is saved and closed

I can see why the close-on-save behaviour would exist, and it's also quite useful for me. A config option could work well to preserve the existing behaviour but also allow close-on-save. What do you think?

[Feature] Enable gist in "Find" pane

I would love to be able to save/retrieve gists wile performing a find/replace. I have some regular expressions saved which would be nice to retrieve for searches

No commands gist:list and others of this plugin

I pasted a token to settings and tried to find any command of this plugin though CTRL+SHIFT+P. There are no commands. I restarted Atom and still have the same problem. How to make it works?
gist
gist2

Hitting TAB instead of Enter stops plugin

Hello!

This is a bug that has been around for a while, I've just not got round to reporting it. It's not a massive problem, just a minor inconvenience.

Firstly, the plugin only appears in the command panel if you're on a 'file' tab, i.e. a real file (not the settings tab). This was probably intentional due to the nature of the plugin being for inserting / saving existing content as a Gist, however I only use it to create / edit Gists and not interact with files.

Secondly, if you hit Tab instead of Enter in the command panel, the plugin is removed from the command list until you reload / focus a (real) file tab.


My ideal solution for this would be able to set in the preferences the default behaviour when you hit enter on a gist. Currently it 'inserts', but personally I want it to open, and edit in a new tab, so every time I use it I have to press Enter -> Find the Gist -> Tab -> Edit

If you'd like any more info, just let me know :)

Changes required due to TextBuffer.save becoming async in Atom 1.19

Hi! Thanks for maintaining the gist package!

In Atom v1.19, we will release a major change to Atom's core text buffer data structure. As part of this change, we have made TextBuffer.save asynchronous; rather than blocking until the save is complete, it now immediately returns a Promise that resolves when the save is complete. Because of this, a few other Atom APIs that use save have similarly become async:

  • Pane.close
  • TextBuffer.save
  • TextEditor.save
  • Pane.saveItem
  • Pane.saveItemAs
  • Pane.saveActiveItem
  • Pane.saveActiveItemAs
  • Pane.saveItems
  • Workspace.saveActivePaneItem
  • Workspace.saveActivePaneItemAs

Effects on this package

We think this package could be impacted by this upgrade because it calls the changed methods in the following places:

  • TextEditor.save

We found these calls using a regex search, so this list might be incomplete, and it might contain some false positives.

What to do about the change

It should be pretty easy to adjust your package code and/or tests to work with the new async behavior, and to simultaneously keep it working with older versions of Atom. Here are some examples of pull requests we opened on our bundled packages to cope with the change:

Please let me know if you have any questions. I'd be happy to help!

Enable opening gist from editor

I know I can open it via Gist:list, find the gist, tab, arrows to open in browser, enter.
In sublime I had an action to open gist in browser on the main actions finder. It would be neat to have this here too.

Closing gist when saving

When I edit my gist and save it closes the tab, then If I want to edit again I have to open the gist in the list.

The preferred behavior it is to maintain the gist tab open when saving.

Enter not working to insert Gist

atom-gist is listing my gists perfectly. I can Edit, Delete and View in browser without an issue.
But I can't Insert. When I select a gist and press 'enter', nothing happens - the gist isn't inserted.

Uncaught TypeError: target.getModel is not a function

[Enter steps to reproduce below:]

  1. Tried to list gists

Atom Version: 1.1.0
System: Mac OS X 10.11.1
Thrown From: gist package, v0.2.6

Stack Trace

Uncaught TypeError: target.getModel is not a function

At /Users/vil/.atom/packages/gist/lib/main.coffee:40

TypeError: target.getModel is not a function
  at atom-text-editor.subscriptions.add.atom.commands.add.gist:list (/Users/vil/.atom/packages/gist/lib/main.coffee:40:47)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:243:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:159:32)
  at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
  at space-pen-div.atom.commands.add.core:confirm (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:243:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:528:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:351:22)
  at HTMLDocument.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:20)

Commands

     -0:46.6.0 core:backspace (input.hidden-input)
     -0:45 core:undo (input.hidden-input)
     -0:41 command-palette:toggle (input.hidden-input)
     -0:38 core:confirm (input.hidden-input)
     -0:38 gist:list (input.hidden-input)
     -0:28.1.0 command-palette:toggle (input.hidden-input)
     -0:25.9.0 core:move-down (input.hidden-input)
     -0:23.9.0 core:confirm (input.hidden-input)
     -0:23.9.0 gist:create-public (input.hidden-input)
     -0:07.6.0 command-palette:toggle (input.hidden-input)
  3x -0:05.0 core:move-down (input.hidden-input)
  3x -0:03.0 core:move-up (input.hidden-input)
     -0:02.3.0 core:confirm (input.hidden-input)
     -0:02.3.0 gist:list (input.hidden-input)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "chester-atom-syntax"
    ],
    "disabledPackages": [
      "git-plus",
      "auto-indent",
      "SFTP-deployment",
      "jsdoc",
      "language-cshtml",
      "merge-conflicts",
      "project-manager",
      "Remote-FTP",
      "atom-color-highlight"
    ],
    "packagesWithKeymapsDisabled": [
      "tidy-tabs"
    ]
  },
  "gist": {
    "token": "cf97a5660ab7270ddbc997ea93eebd5f54eb4a10"
  }
}

Installed Packages

# User
aligner, v0.17.1
atom-pair, v2.0.10
atom-ternjs, v0.8.4
change-case, v0.6.0
chester-atom-syntax, v0.1.1
emmet, v2.3.13
file-icons, v1.6.11
gist, v0.2.6
minimap, v4.15.1
php-cs-fixer, v2.5.1
php-twig, v4.0.0
remote-sync, v3.1.2
symbols-tree-view, v0.10.1
sync-settings, v0.6.0
tidy-tabs, v0.3.0

# Dev
No dev packages

Open gists without active buffer

Opening a new gist should have nothing to do with the currently open file(or no open files)

Today, I often find myself opening an empty buffer to be able to find the action Gist:list in the command palette. Could this be accessible also on a window without active buffers?

0.2.6 -> 0.2.7 - Bad Credentials

Hello,

Since updating to 0.2.7 today, I just get the 'Bad Credentials' error when I try and list my Gists. I can't see anything in the changes that would have affected this.

I have tried generating a new token and working with that, but get the same error.

Is there some more debug info I can get that would be useful?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.