Code Monkey home page Code Monkey logo

atom2yasnippets's Introduction

atom2yasnippets

Install

npm i -g atom2yasnippets

Usage

  1. find a folder to save your snippet, eg: ~/code/privateSnippet
  2. run command atom2yas -url rawCSONAtomSnippetURL, the command will convert the CSON snippet to yasnippet and save to ./dist folder.
  3. add ~/code/privateSnippet/dist to your private snippet folder and restart your Emacs.

eg for spacemacs user:

  "Set yasnippet folder to include customize snippet"
  (setq auto-completion-private-snippets-directory '(
                                                    "/Users/ydli/code/github/atom2yasnippets/dist"
                                                    ))

Example Atom Snippet URL

Language support

  • js-mode/js2-mode/react-mode
  • other launage? will add later, contribute welcome

atom2yasnippets's People

Contributors

nothingrealhappen avatar

Watchers

 avatar  avatar  avatar

atom2yasnippets's Issues

not working

I am using MacOSX 13 High Sierra.
I updated Node.js and installed atom2yasnippets.
I can print the help but that is it.

I have tried the following commands

atom2yas -u "file:///Users/blaine/software/yasnippets/subi.cson" -o ./dist

atom2yas -u file:///Users/blaine/software/yasnippets/subi.cson-o file///Users/blaine/software/yasnippets/dist/

atom2yas -u /Users/blaine/software/yasnippets/subi.cson -o /Users/blaine/software/yasnippets/dist

atom2yas -u rawCSONAtomSnippetURL -o ./dist

All of the above give the error message:

(node:40501) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: only absolute urls are supported

Here is the content of the cson file:

'.text.tex, latex.ing, comment.line.percentage.tex, meta.no-spellcheck':
'subsection with label and index':
prefix: 'subi'
body: '''
\subsection{${1:subsection name}} % (fold)
\label{sub:${1:subsection name}}
\index{${1:subsection name}}
${2:Start here}
% subsection ${1:subsection name} (end)$0
'''

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.