|
1 | 1 | # Atom Snippet Injector |
2 | 2 | **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 :) |
10 | 12 |
|
11 | 13 | --- |
12 | 14 |
|
13 | 15 | ### Please notice! |
14 | 16 | This package is currently under developement. There may be major bugs and functionality is not granted! |
15 | 17 | Please report all bugs to the issues page of the official Git Repository and provide as much information as possible. |
16 | 18 | 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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" |
0 commit comments