How to create and load many files extention


#1

I want to have a file structure that will load and work for different files extension for many snippets for example for .html .ruby .js files

  • Snippets /
    + Html
    html.cson
    + Ruby
    array-ruby.cson
    block-ruby.cson
    + JS
    function.cson
    array.cson
    + Php
    php.cson
    laravel.cson

I want them to load and work

any help will be most appreciated

Thank you in advance


#2

You could do this by creating a package with all of your custom snippets.


#3

Could you see show me how to do that using my example above please?

Thank you very much. Am very grateful


#4

I have to work very soon, but I can provide an example after I get off.


#5

Oh. Thanks alot


#6

Hi Damned Scholar

Any lock?


#7

Hi @DamnedScholar

How is work?

Just thought of reaching you again as it relates to my question.

I would appreciate your helpful tip.

Thank you.


#8

In the menu bar, select Packages -> Package Generator -> Generate Atom Package. Give it a name, like dayogreats' Snippets. Then go into the folder (you can do this in Atom, in your file manager, or in the command line), create a folder entitled snippets, and make your files inside it. You might end up with a file tree that looks like this:

dayogreats-snippets/
  snippets/
    html.cson
    js-array.cson
    js-function.cson
    php.cson
    php-laravel.cson
    ruby-array.cson
    ruby-block.cson

Naming the files with the language first will allow you to sort them alphabetically easily find the one you want.

Now, open the command line interface for your system and navigate to dayogreats-snippets/. Type apm link and Atom will create a symbolic link in .atom/packages that points at your package, so Atom will load your package as if you had installed it.


#9

Awesome @DamnedScholar .

It works perfectly.

Thank you very much