https://github.com/lujun9972/code-library
use org-mode to manage code snippets
https://github.com/lujun9972/code-library
Last synced: 5 months ago
JSON representation
use org-mode to manage code snippets
- Host: GitHub
- URL: https://github.com/lujun9972/code-library
- Owner: lujun9972
- Created: 2015-10-09T12:15:52.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-03-15T02:57:18.000Z (over 9 years ago)
- Last Synced: 2025-06-29T12:43:37.589Z (about 1 year ago)
- Language: Emacs Lisp
- Homepage:
- Size: 15.6 KB
- Stars: 30
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
#+TITLE: README
#+AUTHOR: lujun9972
#+CATEGORY: code-library
#+DATE: [2015-10-09 五 20:23]
#+OPTIONS: ^:{}
* Usage
1. set value of `code-library-directory'
This variable specify the directory where Snippet files are stored.
Default value is "~/CodeLibrary"
2. set value of `code-library-mode-file-alist'
This variable mapping the correspondence between `major-mode' and the snippet file.
The element is like '(MAJOR-MODE . ORG-FILENAME)
3. mark the snippet which you want to save and then ~M-x code-library-save-code~
If the value of `code-library-use-tags-command' is not null, It will automatically run `org-mode' tags prompt when saving a snippet.
If the value of `code-library-sync-to-gist' is not null, the snippet will also be stored to gist.
If the whitespace in code snippet should be preserved (such as Makefile snippet), the major-mode should be added into `code-library-keep-indentation'
If you want to add specified header to every new org-file, you can specify the `code-library-org-file-header' variable.