commit d035399681517841b12e539524fbdddbb33986f0 Author: Ethan Dalool Date: Mon Aug 10 20:36:33 2020 -0700 Initial migratory commit from voussoir/else. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2717f27 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +voussoir/*.pyc diff --git a/README.md b/README.md new file mode 100644 index 0000000..2232d9a --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +voussoir's Sublime Text 2 config +================================ + +If you download this you can feel what it's like to be me. diff --git a/voussoir/Default (Windows).sublime-keymap b/voussoir/Default (Windows).sublime-keymap new file mode 100644 index 0000000..8731126 --- /dev/null +++ b/voussoir/Default (Windows).sublime-keymap @@ -0,0 +1,40 @@ +[ +{ "keys": ["ctrl+shift+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}}, +{ "keys": ["ctrl+shift+m"], "command": "toggle_minimap"}, +{ "keys": ["alt+shift+."], "command": "insert_snippet", "args": { "name": "Packages/XML/long-tag.sublime-snippet" }}, +{ "keys": ["shift+delete"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"}}, +{ "keys": ["ctrl+shift+enter"], "command": "insert", "args": {"characters": "\n#"}}, +{ "keys": ["f4"], "command": "timestamp" }, + +// Auto-pair backticks +{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$|;)", "match_all": true }, + { "key": "preceding_text", "operator": "not_regex_contains", "operand": "[`a-zA-Z0-9_]$", "match_all": true }, + { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double", "match_all": true } + ] +}, +{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true } + ] +}, +{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true } + ] +}, +{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true }, + { "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true } + ] +} +] diff --git a/voussoir/Distraction Free.sublime-settings b/voussoir/Distraction Free.sublime-settings new file mode 100644 index 0000000..96b3f4b --- /dev/null +++ b/voussoir/Distraction Free.sublime-settings @@ -0,0 +1,7 @@ +{ + "line_numbers": true, + "gutter": true, + "wrap_width": 120, + "word_wrap": false, + "scroll_past_end": true +} diff --git a/voussoir/Preferences.sublime-settings b/voussoir/Preferences.sublime-settings new file mode 100644 index 0000000..37b7e9e --- /dev/null +++ b/voussoir/Preferences.sublime-settings @@ -0,0 +1,11 @@ +{ + "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", + "font_face": "Consolas", + "font_size": 9, + "rulers": + [ + 80, + 100 + ], + "scroll_speed": 0 +} diff --git a/voussoir/argparse.sublime-snippet b/voussoir/argparse.sublime-snippet new file mode 100644 index 0000000..d032f93 --- /dev/null +++ b/voussoir/argparse.sublime-snippet @@ -0,0 +1,30 @@ + + +argparse + + + + + diff --git a/voussoir/argparse_multi.sublime-snippet b/voussoir/argparse_multi.sublime-snippet new file mode 100644 index 0000000..7a1c4df --- /dev/null +++ b/voussoir/argparse_multi.sublime-snippet @@ -0,0 +1,32 @@ + + +argparse_multi + + + + + diff --git a/voussoir/defmain.sublime-snippet b/voussoir/defmain.sublime-snippet new file mode 100644 index 0000000..da2f8c4 --- /dev/null +++ b/voussoir/defmain.sublime-snippet @@ -0,0 +1,15 @@ + + +defmain + + + + + diff --git a/voussoir/hash_header.sublime-snippet b/voussoir/hash_header.sublime-snippet new file mode 100644 index 0000000..a560765 --- /dev/null +++ b/voussoir/hash_header.sublime-snippet @@ -0,0 +1,11 @@ + + +hhh + + + + + diff --git a/voussoir/helptext.sublime-snippet b/voussoir/helptext.sublime-snippet new file mode 100644 index 0000000..7934f28 --- /dev/null +++ b/voussoir/helptext.sublime-snippet @@ -0,0 +1,42 @@ + + ____my__program____.py --help +'''.lstrip() + +SUB_DOCSTRINGS = dict( +____my__command____=''' +____my__command____: + ____my__command____description + + > ____my__program____.py ____my__command____ + + flags: + --____my__flag____: +'''.strip(), +) + +DOCSTRING = betterhelp.add_previews(DOCSTRING, SUB_DOCSTRINGS) + +def main(argv): + return betterhelp.subparser_main( + argv, + parser, + main_docstring=DOCSTRING, + sub_docstrings=SUB_DOCSTRINGS, + ) + +]]> +helptext + + + + + diff --git a/voussoir/ifmain.sublime-snippet b/voussoir/ifmain.sublime-snippet new file mode 100644 index 0000000..1dab679 --- /dev/null +++ b/voussoir/ifmain.sublime-snippet @@ -0,0 +1,12 @@ + + +ifmain + + + + + diff --git a/voussoir/listget.sublime-snippet b/voussoir/listget.sublime-snippet new file mode 100644 index 0000000..20cf6c0 --- /dev/null +++ b/voussoir/listget.sublime-snippet @@ -0,0 +1,14 @@ + + + + + + + listget + diff --git a/voussoir/ni=raise_notimplemented.sublime-snippet b/voussoir/ni=raise_notimplemented.sublime-snippet new file mode 100644 index 0000000..57854f1 --- /dev/null +++ b/voussoir/ni=raise_notimplemented.sublime-snippet @@ -0,0 +1,11 @@ + + + + + + + ni + raise NotImplementedError + diff --git a/voussoir/pipeablemain.sublime-snippet b/voussoir/pipeablemain.sublime-snippet new file mode 100644 index 0000000..2b23ba6 --- /dev/null +++ b/voussoir/pipeablemain.sublime-snippet @@ -0,0 +1,18 @@ + + +pipeablemain + + + + + diff --git a/voussoir/systemoutprintln.sublime-snippet b/voussoir/systemoutprintln.sublime-snippet new file mode 100644 index 0000000..0c12ea6 --- /dev/null +++ b/voussoir/systemoutprintln.sublime-snippet @@ -0,0 +1,10 @@ + + + + + + + sysout + diff --git a/voussoir/timestamp.py b/voussoir/timestamp.py new file mode 100644 index 0000000..106578c --- /dev/null +++ b/voussoir/timestamp.py @@ -0,0 +1,11 @@ +''' +Thank you tpitale +https://gist.github.com/tpitale/11e5a2a152ec67a172f9 +''' +import datetime +import sublime, sublime_plugin + +class TimestampCommand(sublime_plugin.TextCommand): + def run(self, edit): + timestamp = "%s" % (datetime.datetime.now().strftime("%Y %m %d")) + self.view.insert(edit, self.view.sel()[0].begin(), timestamp) diff --git a/voussoir/tkinter_geometry.sublime-snippet b/voussoir/tkinter_geometry.sublime-snippet new file mode 100644 index 0000000..c963189 --- /dev/null +++ b/voussoir/tkinter_geometry.sublime-snippet @@ -0,0 +1,27 @@ + + +tkgeometry + + + + + diff --git a/voussoir/tkinter_scrollframe.sublime-snippet b/voussoir/tkinter_scrollframe.sublime-snippet new file mode 100644 index 0000000..106a8ed --- /dev/null +++ b/voussoir/tkinter_scrollframe.sublime-snippet @@ -0,0 +1,43 @@ + + ', self.frame_inner.fix) + + def pack(self, *args, **kwargs): + self.frame_primary.pack(*args, **kwargs) + + def grid(self, *args, **kwargs): + self.frame_primary.grid(*args, **kwargs) +]]> +tkscrollframe + + + + + diff --git a/voussoir/tkinter_template.sublime-snippet b/voussoir/tkinter_template.sublime-snippet new file mode 100644 index 0000000..f58f40c --- /dev/null +++ b/voussoir/tkinter_template.sublime-snippet @@ -0,0 +1,35 @@ + + +tktemplate + + + + + diff --git a/voussoir/utf-8.sublime-snippet b/voussoir/utf-8.sublime-snippet new file mode 100644 index 0000000..6de2fab --- /dev/null +++ b/voussoir/utf-8.sublime-snippet @@ -0,0 +1,10 @@ + + + + + + + uu + diff --git a/voussoir/webpage.sublime-snippet b/voussoir/webpage.sublime-snippet new file mode 100644 index 0000000..1683a78 --- /dev/null +++ b/voussoir/webpage.sublime-snippet @@ -0,0 +1,32 @@ + + + + + {% import "header.html" as header %} + Title + + + + + + + + + + + + + + + + +]]> +webpage + + + + +