-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
without tp selection
- Loading branch information
Showing
5 changed files
with
849 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
[ | ||
{ | ||
[{ | ||
"caption": "Text Pastry: From 0 To X", | ||
"command": "insert_nums", | ||
"command": "insert_nums", | ||
"args": {"current": "0", "step": "1", "padding": "1"} | ||
},{ | ||
}, { | ||
"caption": "Text Pastry: From 1 To X", | ||
"command": "insert_nums", | ||
"command": "insert_nums", | ||
"args": {"current": "1", "step": "1", "padding": "1"} | ||
},{ | ||
"caption": "Text Pastry: From N to X by M", | ||
"command": "text_pastry_show_command_line", | ||
"args": {"text": "\\i(N,M)"} | ||
},{ | ||
"caption": "Text Pastry: Lines from clipboard", | ||
"command": "text_pastry_insert_text", | ||
}, { | ||
"caption": "Text Pastry: Paste Lines", | ||
"command": "text_pastry_insert_text", | ||
"args": {"text": "", "clipboard": true, "separator": "\\n"} | ||
},{ | ||
"caption": "Text Pastry: Words from clipboard", | ||
"command": "text_pastry_insert_text", | ||
}, { | ||
"caption": "Text Pastry: Paste", | ||
"command": "text_pastry_insert_text", | ||
"args": {"text": "", "clipboard": true} | ||
} | ||
] | ||
}, { | ||
"caption": "Text Pastry: UUID", | ||
"command": "text_pastry_uuid" | ||
}, { | ||
"caption": "Text Pastry: Command Line", | ||
"command": "text_pastry_show_command_line", | ||
"args": {"text": ""} | ||
}, { | ||
"caption": "Text Pastry: Menu", | ||
"command": "text_pastry_show_menu" | ||
}, { | ||
"caption": "Text Pastry: Settings", | ||
"command": "text_pastry_show_menu", | ||
"args": {"settings": true, "back": false} | ||
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,94 @@ | ||
{ | ||
"clipboard_strip_newline": true, | ||
"repeat_words": false, | ||
"repeat_clipboard": false, | ||
"history_enabled": true, | ||
"keep_selection": false | ||
"clipboard_strip_newline": true, | ||
"repeat_words": true, | ||
"repeat_clipboard": false, | ||
"history_enabled": false, | ||
"keep_selection": true, | ||
"history_max_entries": 100, | ||
|
||
"selection_use_regex": true, | ||
"selection_ignore_case": true, | ||
"selection_threshold": "[\\W]", | ||
|
||
"presets": { | ||
"days": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], | ||
"months": ["January", "February", "March", "April", "May", "June", "Juli", "August", "September", "October", "November", "December"] | ||
}, | ||
"cmd_shortcuts": [ | ||
// number range from 1 to X | ||
{"match": "^\\\\i$", "command": "insert_nums", "args": {"current": "1", "step": "1", "padding": "1"}}, | ||
{"match": "^i$", "command": "insert_nums", "args": {"current": "1", "step": "1", "padding": "1"}}, | ||
|
||
// number range from 0 to X | ||
{"match": "^\\\\i0$", "command": "insert_nums", "args": {"current": "0", "step": "1", "padding": "1"}}, | ||
{"match": "^i0$", "command": "insert_nums", "args": {"current": "0", "step": "1", "padding": "1"}}, | ||
|
||
// \iN | ||
{"match": "^\\\\i(-?\\d+)$", "command": "insert_nums", "args": {"current": "$1", "step": "1", "padding": "1"}}, | ||
{"match": "^i(-?\\d+)$", "command": "insert_nums", "args": {"current": "$1", "step": "1", "padding": "1"}}, | ||
|
||
// \iN,P | ||
{"match": "^\\\\i(-?\\d+),(-?\\d+)$", "command": "insert_nums", "args": {"current": "$1", "step": "$2", "padding": "1"}}, | ||
{"match": "^i(-?\\d+),(-?\\d+)$", "command": "insert_nums", "args": {"current": "$1", "step": "$2", "padding": "1"}}, | ||
|
||
// \i(N,P) | ||
{"match": "^\\\\i\\((-?\\d+),(-?\\d+)\\)?$", "command": "insert_nums", "args": {"current": "$1", "step": "$2", "padding": "1"}}, | ||
{"match": "^i\\((-?\\d+),(-?\\d+)\\)?$", "command": "insert_nums", "args": {"current": "$1", "step": "$2", "padding": "1"}}, | ||
|
||
// \i(N) | ||
{"match": "^\\\\i\\((-?\\d+)\\)?$", "command": "insert_nums", "args": {"current": "$1", "step": "1", "padding": "1"}}, | ||
{"match": "^i\\((-?\\d+)\\)?$", "command": "insert_nums", "args": {"current": "$1", "step": "1", "padding": "1"}}, | ||
|
||
// insert nums syntax: CURRENT STEP PADDING (e.g. 100 50 3) | ||
{"match": "^(-?\\d+) (-?\\d+) (\\d+)$", "command": "insert_nums", "args": {"current": "$1", "step": "$2", "padding": "$3"}}, | ||
|
||
// insert nums shortcut: CURRENT STEP (e.g. 100 50) | ||
{"match": "^(-?\\d+) (-?\\d+)$", "command": "insert_nums", "args": {"current": "$1", "step": "$2", "padding": "1"}}, | ||
|
||
// use regex to split the clipboard data | ||
{"match": "^\\\\r\\((.*?)\\)$", "command": "text_pastry_insert_text", "args": {"separator": "$1", "clipboard": true, "regex": true}}, | ||
{"match": "^r\\((.*?)\\)$", "command": "text_pastry_insert_text", "args": {"separator": "$1", "clipboard": true, "regex": true}}, | ||
{"match": "^\\\\r (.*)", "command": "text_pastry_insert_text", "args": {"separator": "$1", "clipboard": true, "regex": true}}, | ||
{"match": "^r (.*)", "command": "text_pastry_insert_text", "args": {"separator": "$1", "clipboard": true, "regex": true}}, | ||
{"match": "^regex (.*)", "command": "text_pastry_insert_text", "args": {"separator": "$1", "clipboard": true, "regex": true}}, | ||
|
||
// generate UUID | ||
{"match": "^\\\\UUID$", "command": "text_pastry_uuid", "args": {"uppercase": true} }, | ||
{"match": "^UUID$", "command": "text_pastry_uuid", "args": {"uppercase": true} }, | ||
{"match": "^\\\\uuid$", "command": "text_pastry_uuid" }, | ||
{"match": "^uuid$", "command": "text_pastry_uuid" }, | ||
|
||
// paste clipboard with custom separator | ||
{"match": "^\\\\p\\((.*?)\\)?$", "command": "text_pastry_insert_text", "args": {"separator": "$1", "clipboard": true} }, | ||
{"match": "^p\\((.*?)\\)?$", "command": "text_pastry_insert_text", "args": {"separator": "$1", "clipboard": true} }, | ||
{"match": "^p (.*)", "command": "text_pastry_insert_text", "args": {"separator": "$1", "clipboard": true} }, | ||
|
||
// paste clipboard with newline separator | ||
{"match": "^\\\\p\\\\n", "command": "text_pastry_insert_text", "args": {"separator": "\\n", "clipboard": true} }, | ||
{"match": "^pn$", "command": "text_pastry_insert_text", "args": {"separator": "\\n", "clipboard": true} }, | ||
|
||
// paste clipboard with whitespace separator | ||
{"match": "^\\\\p", "command": "text_pastry_insert_text", "args": {"clipboard": true} }, | ||
{"match": "^p$", "command": "text_pastry_insert_text", "args": {"clipboard": true} }, | ||
|
||
// regular text, using whitespace separator | ||
{"match": "^words no-repeat (.*)", "command": "text_pastry_insert_text", "args": {"text": "$1", "repeat": false} }, | ||
{"match": "^words (.*)", "command": "text_pastry_insert_text", "args": {"text": "$1"} }, | ||
|
||
// build-in commands | ||
{"match": "^uc$", "command": "upper_case"}, | ||
{"match": "^upper$", "command": "upper_case"}, | ||
{"match": "^lc$", "command": "lower_case"}, | ||
{"match": "^lower$", "command": "lower_case"}, | ||
|
||
// shortcut case conversion plugin | ||
{"match": "^snake", "command": "convert_to_snake"}, | ||
{"match": "^camel", "command": "convert_to_camel"}, | ||
{"match": "^pascal", "command": "convert_to_pascal"}, | ||
{"match": "^dot", "command": "convert_to_dot"}, | ||
{"match": "^dash", "command": "convert_to_dash"}, | ||
|
||
{"match": "^node ", "command": "text_pastry_nodejs", "args": {"file": "test.js"} }, | ||
{"match": "^js (.*)", "command": "text_pastry_nodejs", "args": {"script": "$1"} } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>fileTypes</key> | ||
<array> | ||
<string>text_pastry</string> | ||
</array> | ||
<key>name</key> | ||
<string>Text Pastry</string> | ||
<key>scopeName</key> | ||
<string>source.text_pastry</string> | ||
<key>uuid</key> | ||
<string>e8694b5b-0553-463a-a834-335d8187e516</string> | ||
</dict> | ||
</plist> |
Oops, something went wrong.