Coder Social home page Coder Social logo

atom-javascript-snippets's Introduction

Hey, I'm Zeno! πŸ‘‹

πŸ€“ Founder & CEO at Resend
πŸ‡§πŸ‡· Born in Curitiba, Brazil
πŸ‡ΊπŸ‡Έ Living in San Francisco, California

What I'm working on πŸ‘¨β€πŸ’»

πŸ’Œ Currently creating a better way for developers to send email - React Email
πŸ§›β€β™‚οΈ Currently building a dark theme - Dracula PRO

Find me elsewhere 🌎

πŸš€ Site
🐦 Twitter
πŸ“Έ Instagram
πŸ’Ό LinkedIn

atom-javascript-snippets's People

Contributors

bruinebeer avatar brunocoelho avatar carlosliu avatar grvcoelho avatar morenoh149 avatar sergiopvilar avatar zenorocha 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

atom-javascript-snippets's Issues

message not being removed from IDE

Issue:
after enabling, the message overlay obscures open tabs.

Expected behaviour:
message overlay should be removed after a short amount of time or have the option to close manually.

currently fixing with this custom style rule:
.message { display: none }

Add option to remove semicolon

I use your snippets really often but I'm working with Standard rules so it doesn't allow semicolons. So I have to remove them each time.
Would it be possible to remove it with an option ?

es201x

Would it be acceptable to open a PR with es2015 and greater snippets? Specifically I'm considering adding snippets for generators, async functions, and import/export.

Error install

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp http GET https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.11.10/node-v0.11.10.tar.gz
gyp http 200 https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v0.11.10/node-v0.11.10.tar.gz
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: EPERM, utime '/home/calebe/.atom/.node-gyp/.node-gyp/0.11.10'
gyp ERR! System Linux 3.13.0-27-generic
gyp ERR! command "/usr/share/atom/resources/app/apm/node_modules/atom-package-manager/bin/node" "/usr/share/atom/resources/app/apm/node_modules/atom-package-manager/node_modules/node-gyp/bin/node-gyp.js" "install" "--target=0.11.10" "--dist-url=https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist" "--arch=x64"
gyp ERR! cwd /home/calebe/.atom
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! This is a bug in node-gyp.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! https://github.com/TooTallNate/node-gyp/issues

Uncaught Error: Cannot find module 'semver'

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.3
System: Unknown Windows Version
Thrown From: javascript-snippets package, v1.0.0

Stack Trace

Uncaught Error: Cannot find module 'semver'

At module.js:330

Error: Cannot find module 'semver'
    at Module._resolveFilename (module.js:328:15)
    at Function.Module._resolveFilename (D:\Users\dchabrier\AppData\Local\atom\app-1.0.3\resources\app.asar\src\module-cache.js:383:52)
    at Function.Module._load (module.js:270:25)
    at Module.require (module.js:357:17)
    at require (module.js:376:17)
    at Object.<anonymous> (/D:/Users/dchabrier/.atom/packages/autocomplete-plus-master/lib/autocomplete-manager.coffee:10:12)
    at Object.<anonymous> (/D:/Users/dchabrier/.atom/packages/autocomplete-plus-master/lib/autocomplete-manager.coffee:694:4)
    at Module._compile (module.js:452:26)
    at Object.requireCoffeeScript (D:\Users\dchabrier\AppData\Local\atom\app-1.0.3\resources\app.asar\node_modules\coffee-cash\lib\coffee-cash.js:85:19)
    at Module.load (module.js:347:32)

Commands

Config

{
  "core": {
    "disabledPackages": [
      "autocomplete-plus",
      "autocomplete-plus",
      "autocomplete-plus",
      "autocomplete-plus"
    ]
  }
}

Installed Packages

# User
No installed packages

# Dev
No dev packages

[cl] + Tab gives class in ES6.

I really love this package and use it a lot.
If you guys could change it to console.log to something else like just log that will be a big help as editor gives class as default for cl+Tab. Just a recommendation. You can close the issue if it doesn't work for you.

Support alternative JS sources?

JavaScript sources may not always have a .js file extension. Any plans to support others?

Atom lets you specify multiple comma-separated sources like so:

".source.js, .source.jsx":
  "forEach":
    "prefix": "fe"
    "body": """
    ${1:myArray}.forEach(function(${2:elem}) {
    \t${0:// body...}
    });
    """

key binding conflict between php-beautifier, your atom-javascript-snippets & 3 other packages, causes Dev Tools console to come up when invoking Settings

hello,

i have found a key binding conflict between your php-beautifier package, your atom-javascript-snippets, and three other atom editor (ver. 0.94.0) packages, all sharing the same ctrl-alt-o (ctrl-option-o on Mac OS X) key binding.

your atom-javascript-snippets package don't conflict with anything else when run without php-beautifier enabled. however, when php-beautifier is then enabled, it causes, when bringing up the Settings view tab/pane (cmd-,) in the atom editor, the Dev Tools console (usually invoked with cmd-alt-i) in the lower third of the atom editor window, when you haven't requested the Dev Tools console to come up.

when i turned php-beautifier from disabled to enabled and restarted Atom, i was able to reproduce the problem of bring up the Atom Dev Tools console when simply trying to open the Settings view tab/pane.

the reason this is happening, i believe, is because it shares the same key binding, ctrl-option-o, or ctrl-alt-o on non-Apple-Mac keyboards, as the following four packages i'm also running β€”

atom-git-show (https://github.com/fundon/atom-git-show)
autoclose-html (https://github.com/mattberkowitz/autoclose-html)
deprecation-cop (https://github.com/atom/deprecation-cop)
php-beautifier (https://github.com/sdwood/php-beautifier/)

your package and all these, along with php-beautifier, share the same ctrl-alt-o key binding. yours with the other three co-exist just fine with that same binding (save the fact that the key binding doesn't work because of the conflict, you have to invoke your package by the Command Palette, cmd-shift-p), but the moment you enable php-beautifier and restart Atom 0.94.0, then try and bring up the Settings tab/pane, you get, suddenly, the Dev Tools console coming up in the bottom third of the Atom Editor window when you never asked for it.

i found this, after seeing php-beautifier was causing the issue, by using the keybinding-resolver package, which showed me all the packages sharing the same ctrl-alt-o key binding.

i thought you would want to know about this, contact the other package developers, and try and resolve this, perhaps by one or more of you choosing another key binding to invoke your atom-javascript-snippets package.

i am also filing issues with these other developers and have also notified atom core support of this issue.

best,

β€” faddah wolf
portland, oregon, u.s.a.

How to trigger this function

hi ,
How to trigger this function , when I enter cl or other Shortcut keys , nothing happen . please help me to solve this problom !

snippets doesn't follow editor's indent rule

I normally set tab and indent size to 4. The snippets in this package always force 2 space indentation. I have noticed that snippets in the language-javascript package use \t instead of space. That works pretty well, and editor can replace leading tab to preferred indent size automatically.

Wrong tab size

Hello

I have noticed that all snippets are hardcoded to soft tabs of size 2.
That is not very convenient if the rest of your code uses tabs of any other size.
Is there a specific reason for this? Am I the only one bothered by it?

By the way, I would gladly submit a pull request to fix it.

Inline Script-Block Snippets

Is there any way to enable, or make these snippets/shortcuts available inside inline script blocks. Specifically, within *.html or outside of *.js files.

Redundant complement

In the shortcut "ae" the code is produced:

$ {1: document} .addEventListener ('$ {2: event}', function () {
Β  $ {0: // body ...}
});

But people do not always use functions written directly in the "addEventListener" as in the example below;

element.addEventListener('xpto', myfunction);

What I suggest is to remove the anonymous function from within the "ae" shortcut and if the user wishes to add an anonymous function use the "afn" shortcut.
My shortcut is like this;

$ {1: document} .addEventListener ('$ {2: event}', $ {0:});

So when I need to use the shortcut just type:

"ae" + tab;
type the name of the element + tab;
type the desired event + tab;
type "afn" + tab.

If I do not want to use an anonymous function, I just type the name of my external function.

inconvenient BDD snippet

current

[ita] it asynchronous
it('${1:description}', function(done) {
    ${0:// body...}
});

[its] it synchronous
it('${1:description}', function() {
    ${0:// body...}
});

[itp] it pending
it('${1:description}');

suggest

it => synchronous style
itc => callback style asynchronous style
ita => async/await style asynchronous style

Space between function and parenthesis if function is anonymous

Thanks for this plugin, have used the hell out of it 😈 . Theres only one thing that bugs me. Everytime I use a snippet with a anonymous function in it, I have to add the space between function and the left parenthesis myself. I know this is a matter of style but it´s the style we use in our project and I have at least Crockford on my side. Maybe it could be made an option at least?

Same problem again version is wrong in Atom

Not sure why Atom keep giving this version whereas in your repository is still not the same with the site.

Unable to download https://www.atom.io/api/packages/javascript-snippets/versions/0.2.0/tarball: 404

Apm install not working in development

I'm not sure what the expected Node/npm versions are to run this, but running apm install for me produces this:

Installing modules βœ—
[email protected] /Users/michael/code/github/mikeLspohn/atom-javascript-snippets
β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”€ [email protected]
β”‚ └── [email protected]
└─┬ [email protected]
  └── [email protected]

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm ERR! Darwin 15.5.0
npm ERR! argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/michael/.atom/.apm/.apmrc" "--userconfig" "/Users/michael/.atom/.apmrc" "install" "--runtime=electron" "--target=0.37.8" "--arch=x64"
npm ERR! node v4.4.5
npm ERR! npm  v3.10.5
npm ERR! path /Users/michael/code/github/mikeLspohn/atom-javascript-snippets/node_modules/editorconfig/bin\editorconfig
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/michael/code/github/mikeLspohn/atom-javascript-snippets/node_modules/editorconfig/bin\editorconfig'
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/michael/code/github/mikeLspohn/atom-javascript-snippets/node_modules/editorconfig/bin\editorconfig'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/michael/code/github/mikeLspohn/atom-javascript-snippets/npm-debug.log

I noticed it's missing editorconfig in package.json, so I installed that, but still received errors.

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.