All Projects → danielbayley → Atom Modular Snippets

danielbayley / Atom Modular Snippets

Licence: mit
:atom: A modular solution to snippets in @Atom.

Programming Languages

coffeescript
4710 projects

Projects that are alternatives of or similar to Atom Modular Snippets

.emacs.d
🎉 Personal GNU Emacs configuration
Stars: ✭ 313 (+3812.5%)
Mutual labels:  config, snippets
Cs.2click
🔊 A Better Audio Router for a Modular System.
Stars: ✭ 7 (-12.5%)
Mutual labels:  package, modular
Vscode Vuehelper
🐵vscode插件,vue,vue-router和vuex的代码提示
Stars: ✭ 351 (+4287.5%)
Mutual labels:  snippets, editor
atom-yii2
Atom package for working with Yii Framework 2
Stars: ✭ 22 (+175%)
Mutual labels:  atom, apm
Unitycopylightingsettings
Unity editor extension to copy&paste lighting settings from one scene to another.
Stars: ✭ 25 (+212.5%)
Mutual labels:  package, editor
React Native Snippets
✏️ A collection of React Native snippets for Sublime Text and Atom
Stars: ✭ 257 (+3112.5%)
Mutual labels:  atom, snippets
Upmgitextension
This package extends the UI of Unity Package Manager (UPM) for the packages installed from git repository.
Stars: ✭ 438 (+5375%)
Mutual labels:  package, editor
multi-cursor
🎉
Stars: ✭ 44 (+450%)
Mutual labels:  atom, package
Rasa
Extremely modular text editor built in Haskell
Stars: ✭ 597 (+7362.5%)
Mutual labels:  modular, editor
Gf
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.
Stars: ✭ 6,501 (+81162.5%)
Mutual labels:  config, modular
30-seconds-of-code-texteditorsnippets
Files to import the 30-seconds-of-code snippets into VSCode, Atom and Sublime.
Stars: ✭ 35 (+337.5%)
Mutual labels:  atom, snippets
Code Notes
A simple code snippet & gist manager for developers built with Electron & Vue.js 🚀
Stars: ✭ 919 (+11387.5%)
Mutual labels:  snippets, editor
pymolsnips
Pymolsnips is a library of PyMOL scripting language code fragments for several popular text editors.
Stars: ✭ 19 (+137.5%)
Mutual labels:  atom, snippets
Php Ide Serenata
Atom IDE package that integrates the Serenata server to provide PHP code assistance
Stars: ✭ 277 (+3362.5%)
Mutual labels:  atom, package
atom-package-sync
Synchronize your atom packages and settings easily
Stars: ✭ 22 (+175%)
Mutual labels:  atom, package
Dotfiles
Setup and install scripts for a new machine + dotfiles for various apps. Linux, Mac, and Mac (Amazon specific) branches are included.
Stars: ✭ 382 (+4675%)
Mutual labels:  atom, snippets
atom-toolbar-almighty
Atom editor's missing toolbar
Stars: ✭ 21 (+162.5%)
Mutual labels:  atom, package
element-helper
🚀 Element-Helper is a Atom package for Element-UI.
Stars: ✭ 74 (+825%)
Mutual labels:  atom, package
Remote Ftp
FTP/FTPS/SFTP client for Atom.io
Stars: ✭ 549 (+6762.5%)
Mutual labels:  atom, editor
Vuejs Snippets
Collection of Vuejs 2.0+ snippets
Stars: ✭ 17 (+112.5%)
Mutual labels:  atom, snippets

badge badge

Modular Snippets

A modular solution to snippets in Atom, including support for project-specific collections.

Any valid snippets [CSON or JSON] file inside ATOM_HOME/snippets/** will be loaded automatically, or reloaded if modified.

This package does not interfere with the existing snippets.cson, so you can slowly transition to this more modular approach.

The Atom Snippets… menu item will be overridden to open your snippets folder in a new window, along with the default snippets.cson if it still exists.

The Atom Snippets… menu item will be overridden to open your snippets folder in a new window, along with the default snippets.cson if it still exists.

Project Snippets

Some snippets might only be relevant to a particular project, so it makes sense to store them with that project; these could then be committed to version control and shared between a team. These local snippets are loaded from the first item found in the root of your project based on the following order:

  • [.]snippets.cson
  • [.]snippets/**/*.cson
  • snippets: {object} in package.json
  • snippets: {object} in your project-config

API

This package also provides a service to load any snippets {object}, file or folder…

// package.json
"consumedServices": {
  "modular-snippets": {
    "versions": {
      "^1.0.0": "consume"
    }
  }
},
# index.coffee
{Disposable} = require 'atom'

snippet = # {object}, file or folder.
  '.source.coffee':
    Snippet:
      prefix: 'prefix'
      body: 'snippet'

consumeSnippets: ({load}) ->
  load snippet
  new Disposable -> stopUsingService load

or using ES6 if you’re into that…

// index.js
'use babel';

import { Disposable } from 'atom';

let snippet = { // object }, file or folder.
  '.source.js': {
    Snippet: {
      prefix: 'prefix',
      body: 'snippet'
    }
  }
};

function consumeSnippets({load} => {
  load(snippet);
  return new Disposable(() => stopUsingService(load));
}

Install

apm install modular-snippets or search “snippets” under packages within Atom.

License

MIT © Daniel Bayley

Thanks to @thibmaek for the base repository.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].