All Projects → abrochard → org-sync-snippets

abrochard / org-sync-snippets

Licence: GPL-3.0 license
Simple extension to export snippets to org-mode and vice versa

Programming Languages

emacs lisp
2029 projects

Projects that are alternatives of or similar to org-sync-snippets

.emacs.d
🎉 Personal GNU Emacs configuration
Stars: ✭ 313 (+2135.71%)
Mutual labels:  snippets, org-mode
vim-symfony
Symfony Vim plugin
Stars: ✭ 27 (+92.86%)
Mutual labels:  snippets
vscode-text-tables
VSCode extension that brings the power of Emacs table editing
Stars: ✭ 36 (+157.14%)
Mutual labels:  org-mode
devs-codex
A repo of helpful front end development and design links
Stars: ✭ 16 (+14.29%)
Mutual labels:  snippets
org-gantt
Gantt chart for emacs org-mode
Stars: ✭ 55 (+292.86%)
Mutual labels:  org-mode
friendly-snippets
Set of preconfigured snippets for different languages.
Stars: ✭ 824 (+5785.71%)
Mutual labels:  snippets
Tutorials
Repository for my YouTube tutorials + code snippets
Stars: ✭ 224 (+1500%)
Mutual labels:  snippets
vscode-wxml
Wechat wxml support and wxml code snippets for VSCode
Stars: ✭ 19 (+35.71%)
Mutual labels:  snippets
simple-recaptcha-v3
🤖 This repository contains simple reCAPTCHA v3 integration for your Laravel application.
Stars: ✭ 25 (+78.57%)
Mutual labels:  snippets
language-mjml
Atom Editor package providing syntax support for MJML
Stars: ✭ 48 (+242.86%)
Mutual labels:  snippets
bits
Bits by Creative Tim - Code Snippets for easier coding
Stars: ✭ 142 (+914.29%)
Mutual labels:  snippets
VSCode-LaTeX-Inkscape
✍️ A way to integrate LaTeX, VS Code, and Inkscape in macOS
Stars: ✭ 62 (+342.86%)
Mutual labels:  snippets
interview-refresh-java-bigdata
a one-stop repo to lookup for code snippets of core java concepts, sql, data structures as well as big data. It also consists of interview questions asked in real-life.
Stars: ✭ 25 (+78.57%)
Mutual labels:  snippets
nast
A block-based intermediate representation for document-like content.
Stars: ✭ 35 (+150%)
Mutual labels:  org-mode
BowieCode
Personal Code/Snippet Library for Unity 3D
Stars: ✭ 23 (+64.29%)
Mutual labels:  snippets
snippets
My code snippets
Stars: ✭ 29 (+107.14%)
Mutual labels:  snippets
fixes
Random development problems and solutions
Stars: ✭ 38 (+171.43%)
Mutual labels:  snippets
snippets
A Chrome extension that allows you to create and edit JavaScript code snippets, which are synced to all your computers
Stars: ✭ 46 (+228.57%)
Mutual labels:  snippets
PKMigrator
Tools to migrate between various Personal Knowledge Management Utilities
Stars: ✭ 36 (+157.14%)
Mutual labels:  org-mode
monitoring-recipes
Useful code snippets and tools from the Monitoring Team at LogicMonitor.
Stars: ✭ 27 (+92.86%)
Mutual labels:  snippets

MELPA

org-sync-snippets

Simple extension to export snippets to org-mode and vice versa.

It was designed with Yasnippet in mind.

Motivation

I really like Yasnippet and would like to collect my snippets files into one place. It is a lot of files to track if I put them into source control, and I rarely modify the ones I have.

On the other hand, I also do not want to track all the snippets I make and keep some private.

For these reasons, I made org-sync-snippets which compiles snippets files to an org file and back.

Install

Install from MELPA with

M-x package-install org-sync-snippets

or load the present file.

Usage

Load with

(require 'org-sync-snippets)

To export your snippets to an org-mode file, use

M-x org-sync-snippets-snippets-to-org

Alternatively, to turn your org-mode file into snippets

M-x org-sync-snippets-org-to-snippets

Notice: you can prevent certain snippets from being exported to org by adding the tangle: no tag in them.

# -*- mode: snippet -*-
# name: var_dump
# key: dump
# tangle: no
# --
var_dump($1); exit;$0

This particular snippet will not make it into the compiled org file.

Customize

By default, snippets are taken from the 'user-emacs-directory' (typically '~/.emacs.d/snippets/') folder. You can change this with

(setq org-sync-snippets-snippets-dir "~/your/path/to/snippets")

Similarly, the org file compiled goes to your 'org-directory' (usually '~/org/snippets.org'). You can define a different one with

(setq org-sync-snippets-org-snippet-file "~/your/path/to/snippet/file")

Finally, if you want to save your snippets regularly, I recommend using a hook like

(add-hook 'yas-after-reload-hook 'snippets-to-org)
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].