Skip to content
This repository was archived by the owner on Dec 12, 2021. It is now read-only.

Commit 861a5ba

Browse files
committed
Merge branch 'dev'
2 parents ce2a452 + b3ef8ac commit 861a5ba

12 files changed

+143
-10
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
.DS_Store
22
npm-debug.log
33
node_modules
4+
screenshots/create_step_1.png
5+
screenshots/create_step_2.png
6+
screenshots/create_step_3.png
7+
screenshots/delete_step_1.png
8+
screenshots/delete_step_2.png
9+
screenshots/delete_step_3.png
10+
screenshots/insert_step_1.png
11+
screenshots/insert_step_2.png
12+
screenshots/insert_step_3.png

CHANGELOG.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1-
## 0.1.0 - First Release
2-
* Saving function added
3-
* Loading function added
1+
### Please notice ###
2+
***This Changelog will not be updated properly during early-development.***
3+
4+
----------------
5+
6+
## v0.1.0 ~ v1.0.0
7+
**Early Development**
8+
#### Features
9+
- Create option added
10+
- Insert option added
11+
- Delete option added
12+
- Snippet class added with properties:
13+
- Title
14+
- Tags *(not used currently)*
15+
- Content
16+
- Language *(not used currently)*
17+
#### Improvements
18+
- Basic styling of prompts
19+
- Commands added to:
20+
- Context Menu
21+
- Main Menu
22+
- Hotkeys *(partially)*
23+
24+
#### Patches
25+
- Storage directory creation / reading
26+
- Prompt's search didn't work
27+
- JSON error on snippet saving

README.md

Lines changed: 107 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,116 @@
11
# Atom Snippet Injector
22
**An easy but powerful snippet management tool for Atom editor.**
3-
This atom package provides a JSON based snippet management without any difficult UIs or file syntaxes.
4-
Just select the text you want to store in a snippet, run the `snippet-injector:create` command, enter a title and your snippet is good to go.
5-
To insert it back in the editor run the `snippet-injector:insert` command. choose the snippet and it gets inserted at you current marker(s).
6-
To edit a snippet just insert it, edit it to your wishes and save it right back with the same name.
7-
If you finally want to get rid of a snippet, run the `snippet-injector:delete` command and enter the title of the snippet you want to delete.
8-
All commmands mentioned in this Quick Start Guide are available throug Command Palette, Hotkeys (see them in the package settings), Context Menu and Main Menu.
9-
Happy coding :)
3+
This atom package provides a JSON based snippet management.
4+
5+
*But why use this package* you ask?
6+
7+
Because you can reach every feature in more or less three steps.
8+
9+
It's easy and fast so you don't have to struggle with difficult UI's or file syntaxes or even worse, writing the snippets manually.
10+
Check out the [Examples](#examples) below for more instructions on how to use this package.
11+
Happy Coding :)
1012

1113
---
1214

1315
### Please notice!
1416
This package is currently under developement. There may be major bugs and functionality is not granted!
1517
Please report all bugs to the issues page of the official Git Repository and provide as much information as possible.
1618
I'll take care of all bugs as soon as possible. Ideas are also appreciated, I'll add a possibility for that soon.
19+
20+
21+
---
22+
23+
## Examples
24+
25+
### Create
26+
(_[Reference](#commands)_)
27+
28+
Select the text that you want to store as a snippet.
29+
Open up the context menu and click on `Create snippet from selection`.
30+
31+
![](/screenshots/create_step_1-small.png)
32+
[(full screenshot)](https://prntscr.com/fxabhj)
33+
34+
Enter a useful title for the snippet and confirm.
35+
*(Bare in mind that you need to recognize your snippet by this title)*
36+
37+
![](/screenshots/create_step_2-small.png)
38+
[(full screenshot)](https://prntscr.com/fxabn6)
39+
40+
The snippet is now saved in you local Atom storage.
41+
*A notification tells you about errors and success.*
42+
43+
![](/screenshots/create_step_3-small.png)
44+
[(full screenshot)](https://prntscr.com/fxabsv)
45+
46+
### Insert
47+
(_[Reference](#commands)_)
48+
49+
Place the marker(s) at the position you want you snippet to be inserted.
50+
Open up the context menu and click on `Insert snippet`.
51+
52+
![](/screenshots/insert_step_1-small.png)
53+
[(full screenshot)](https://prntscr.com/fxacde)
54+
55+
Choose your snippet from the list by clicking it.
56+
*(If you got a lot of snippets there is a search input box at the top of the prompt window)*
57+
58+
![](/screenshots/insert_step_2-small.png)
59+
[(full screenshot)](https://prntscr.com/fxacj8)
60+
61+
The snippet's content gets inserted.
62+
*A notification tells you about errors and success.*
63+
64+
![](/screenshots/insert_step_3-small.png)
65+
[(full screenshot)](https://prntscr.com/fxacrn)
66+
67+
### Delete
68+
(_[Reference](#commands)_)
69+
70+
Open up the context menu and click on `Delete snippet`.
71+
72+
![](/screenshots/delete_step_1-small.png)
73+
[(full screenshot)](https://prntscr.com/fxabyh)
74+
75+
Enter the title of the snippet you want to delete and confirm.
76+
*(You will be prompted twice before actual deletion. Bare in mind that deleted snippets are gone forever!)*
77+
78+
![](/screenshots/delete_step_2-small.png)
79+
[(full screenshot)](https://prntscr.com/fxac6s)
80+
81+
The snippet is now deleted from the local Atom storage.
82+
*A notification tells you about errors and success.*
83+
84+
![](/screenshots/delete_step_3-small.png)
85+
[(full screenshot)](https://prntscr.com/fxac96)
86+
87+
88+
---
89+
90+
## Reference
91+
92+
#### Commands
93+
There are basically three commands snippet-injector ships with:
94+
95+
##### **snippet-injector:create**
96+
This command creates a new snippet from the current selection in the current editor.
97+
You will be prompted for a snippet title.
98+
99+
*Name in menus:*
100+
> "Create snippet from selection"
101+
102+
103+
##### **snippet-injector:insert**
104+
This command injects a snippet to the current marker position(s).
105+
You will be prompted to choose a snippet from a list.
106+
107+
*Name in menus:*
108+
> "Insert snippet"
109+
110+
111+
##### **snippet-injector:delete**
112+
This command deletes a snippet from the local storage.
113+
You will be prompted for the snippet name to delete.
114+
115+
*Name in menus:*
116+
> "Delete snippet"
29.6 KB
Loading
7.13 KB
Loading
3.83 KB
Loading
13 KB
Loading
6.6 KB
Loading
3.54 KB
Loading
16.4 KB
Loading

0 commit comments

Comments
 (0)