Permalink
Browse files

initial commit

  • Loading branch information...
mwrock committed Apr 2, 2012
0 parents commit 2d96de030cf5f45b42690c3e01847f632b4e37e6
Showing with 8,988 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +16 −0 PackageAssets/SublimePackages/AAAPackageDev/.hgignore
  3. +9 −0 PackageAssets/SublimePackages/AAAPackageDev/AAA.py
  4. BIN PackageAssets/SublimePackages/AAAPackageDev/AAA.pyc
  5. +1 −0 PackageAssets/SublimePackages/AAAPackageDev/LICENSE.txt
  6. 0 PackageAssets/SublimePackages/AAAPackageDev/Lib/sublime_lib/__init__.py
  7. +63 −0 PackageAssets/SublimePackages/AAAPackageDev/Lib/sublime_lib/constants.py
  8. +25 −0 PackageAssets/SublimePackages/AAAPackageDev/Lib/sublime_lib/path.py
  9. +1 −0 PackageAssets/SublimePackages/AAAPackageDev/Lib/sublime_lib/view/__init__.py
  10. +43 −0 PackageAssets/SublimePackages/AAAPackageDev/Lib/sublime_lib/view/_view.py
  11. 0 PackageAssets/SublimePackages/AAAPackageDev/Lib/sublime_lib/view/sel.py
  12. +30 −0 PackageAssets/SublimePackages/AAAPackageDev/Main.sublime-menu
  13. +156 −0 PackageAssets/SublimePackages/AAAPackageDev/README.rst
  14. +5 −0 PackageAssets/SublimePackages/AAAPackageDev/RELEASE.txt
  15. +8 −0 PackageAssets/SublimePackages/AAAPackageDev/Snippets/Commands/Commands.sublime-completions
  16. +8 −0 ...ts/SublimePackages/AAAPackageDev/Snippets/Completions Development/Completions.sublime-completions
  17. +7 −0 ...geAssets/SublimePackages/AAAPackageDev/Snippets/Key Bindings/Arguments to Command.sublime-snippet
  18. +5 −0 PackageAssets/SublimePackages/AAAPackageDev/Snippets/Key Bindings/Context Entry.sublime-snippet
  19. +8 −0 PackageAssets/SublimePackages/AAAPackageDev/Snippets/Key Bindings/Context.sublime-snippet
  20. +8 −0 PackageAssets/SublimePackages/AAAPackageDev/Snippets/Key Bindings/Simple Key Binding.sublime-snippet
  21. +13 −0 ...limePackages/AAAPackageDev/Snippets/Settings Development/Settings Development.sublime-completions
  22. +14 −0 ...ublimePackages/AAAPackageDev/Snippets/Snippet Development/Snippet Development.sublime-completions
  23. +8 −0 ...ublimePackages/AAAPackageDev/Snippets/Syntax Definitions/(repoit) Repository Item.sublime-snippet
  24. +7 −0 ...blimePackages/AAAPackageDev/Snippets/Syntax Definitions/bcaptures-(beginCaptures).sublime-snippet
  25. +9 −0 PackageAssets/SublimePackages/AAAPackageDev/Snippets/Syntax Definitions/begin.sublime-snippet
  26. +5 −0 PackageAssets/SublimePackages/AAAPackageDev/Snippets/Syntax Definitions/capture.sublime-snippet
  27. +7 −0 PackageAssets/SublimePackages/AAAPackageDev/Snippets/Syntax Definitions/captures.sublime-snippet
  28. +5 −0 PackageAssets/SublimePackages/AAAPackageDev/Snippets/Syntax Definitions/comment.sublime-snippet
  29. +7 −0 ...SublimePackages/AAAPackageDev/Snippets/Syntax Definitions/ecaptures-(endCaptures).sublime-snippet
  30. +5 −0 ...sets/SublimePackages/AAAPackageDev/Snippets/Syntax Definitions/ftypes-(fileTypes).sublime-snippet
  31. +5 −0 PackageAssets/SublimePackages/AAAPackageDev/Snippets/Syntax Definitions/include.sublime-snippet
  32. +5 −0 PackageAssets/SublimePackages/AAAPackageDev/Snippets/Syntax Definitions/key.sublime-snippet
  33. +7 −0 PackageAssets/SublimePackages/AAAPackageDev/Snippets/Syntax Definitions/match.sublime-snippet
  34. +6 −0 PackageAssets/SublimePackages/AAAPackageDev/Snippets/Syntax Definitions/patterns.sublime-snippet
  35. +5 −0 PackageAssets/SublimePackages/AAAPackageDev/Snippets/Syntax Definitions/repository.sublime-snippet
  36. +23 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/AAAPackageDev.sublime-commands
  37. +138 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/API/API.sublime-completions
  38. +17 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Default.sublime-keymap
  39. +26 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Generic Array.JSON-tmLanguage
  40. +50 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Generic Array.tmLanguage
  41. BIN PackageAssets/SublimePackages/AAAPackageDev/Support/Generic Array.tmLanguage.cache
  42. +41 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/JSON Generic Array Elements.JSON-tmLanguage
  43. +76 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/JSON Generic Array Elements.tmLanguage
  44. BIN PackageAssets/SublimePackages/AAAPackageDev/Support/JSON Generic Array Elements.tmLanguage.cache
  45. +3 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Json to tmLanguage.sublime-build
  46. +16 −0 ...ckages/AAAPackageDev/Support/Key Bindings/Key Bindings - Context Operand Left.sublime-completions
  47. +8 −0 ...kages/AAAPackageDev/Support/Key Bindings/Key Bindings - Context Operand Right.sublime-completions
  48. +12 −0 ...ePackages/AAAPackageDev/Support/Key Bindings/Key Bindings - Context Operators.sublime-completions
  49. +81 −0 ...es/AAAPackageDev/Support/Key Bindings/Key Bindings - Key Binding Key Sequence.sublime-completions
  50. +129 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Regular Expression (Escaped).JSON-tmLanguage
  51. +275 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Regular Expression (Escaped).tmLanguage
  52. BIN PackageAssets/SublimePackages/AAAPackageDev/Support/Regular Expression (Escaped).tmLanguage.cache
  53. +82 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Commands.JSON-tmLanguage
  54. +164 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Commands.tmLanguage
  55. BIN PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Commands.tmLanguage.cache
  56. +90 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Completions.JSON-tmLanguage
  57. +3 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Completions.sublime-settings
  58. +183 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Completions.tmLanguage
  59. BIN PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Completions.tmLanguage.cache
  60. +182 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime JSON Syntax Definition.JSON-tmLanguage
  61. +429 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime JSON Syntax Definition.tmLanguage
  62. BIN PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime JSON Syntax Definition.tmLanguage.cache
  63. +112 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Key Map.JSON-tmLanguage
  64. +3 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Key Map.sublime-settings
  65. +245 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Key Map.tmLanguage
  66. BIN PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Key Map.tmLanguage.cache
  67. +69 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Macros.JSON-tmLanguage
  68. +138 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Macros.tmLanguage
  69. BIN PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Macros.tmLanguage.cache
  70. +18 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Settings.JSON-tmLanguage
  71. +3 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Settings.sublime-settings
  72. +45 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Settings.tmLanguage
  73. BIN PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Settings.tmLanguage.cache
  74. +79 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Snippet (Raw).JSON-tmLanguage
  75. +183 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Snippet (Raw).tmLanguage
  76. BIN PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Snippet (Raw).tmLanguage.cache
  77. +171 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Text Build System.JSON-tmLanguage
  78. +3 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Text Build System.sublime-settings
  79. +405 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Text Build System.tmLanguage
  80. BIN PackageAssets/SublimePackages/AAAPackageDev/Support/Sublime Text Build System.tmLanguage.cache
  81. +25 −0 PackageAssets/SublimePackages/AAAPackageDev/Support/make_tmlanguage.py
  82. +11 −0 PackageAssets/SublimePackages/AAAPackageDev/bin/CleanUp.ps1
  83. +33 −0 PackageAssets/SublimePackages/AAAPackageDev/bin/MakeRelease.ps1
  84. +18 −0 PackageAssets/SublimePackages/AAAPackageDev/build_sys_dev.py
  85. BIN PackageAssets/SublimePackages/AAAPackageDev/build_sys_dev.pyc
  86. +20 −0 PackageAssets/SublimePackages/AAAPackageDev/commands_file_dev.py
  87. BIN PackageAssets/SublimePackages/AAAPackageDev/commands_file_dev.pyc
  88. +21 −0 PackageAssets/SublimePackages/AAAPackageDev/completions_dev.py
  89. BIN PackageAssets/SublimePackages/AAAPackageDev/completions_dev.pyc
  90. +35 −0 PackageAssets/SublimePackages/AAAPackageDev/data/README.rst
  91. +9 −0 PackageAssets/SublimePackages/AAAPackageDev/data/html_template.txt
  92. +37 −0 PackageAssets/SublimePackages/AAAPackageDev/data/main.css
  93. +14 −0 PackageAssets/SublimePackages/AAAPackageDev/json2plist.py
  94. BIN PackageAssets/SublimePackages/AAAPackageDev/json2plist.pyc
  95. +19 −0 PackageAssets/SublimePackages/AAAPackageDev/manifest.in
  96. +1 −0 PackageAssets/SublimePackages/AAAPackageDev/package-metadata.json
  97. +136 −0 PackageAssets/SublimePackages/AAAPackageDev/package_dev.py
  98. BIN PackageAssets/SublimePackages/AAAPackageDev/package_dev.pyc
  99. +17 −0 PackageAssets/SublimePackages/AAAPackageDev/settings_dev.py
  100. BIN PackageAssets/SublimePackages/AAAPackageDev/settings_dev.pyc
  101. +589 −0 PackageAssets/SublimePackages/AAAPackageDev/setup.py
  102. BIN PackageAssets/SublimePackages/AAAPackageDev/setup.pyc
  103. +71 −0 PackageAssets/SublimePackages/AAAPackageDev/snippet_dev.py
  104. BIN PackageAssets/SublimePackages/AAAPackageDev/snippet_dev.pyc
  105. +57 −0 PackageAssets/SublimePackages/AAAPackageDev/sublime_inspect.py
  106. BIN PackageAssets/SublimePackages/AAAPackageDev/sublime_inspect.pyc
  107. +80 −0 PackageAssets/SublimePackages/AAAPackageDev/syntax_def_dev.py
  108. BIN PackageAssets/SublimePackages/AAAPackageDev/syntax_def_dev.pyc
  109. 0 PackageAssets/SublimePackages/AAAPackageDev/tests/sublime.py
  110. 0 PackageAssets/SublimePackages/AAAPackageDev/tests/sublime_plugin.py
  111. +12 −0 PackageAssets/SublimePackages/AAAPackageDev/tests/test_setup.py
  112. +22 −0 PackageAssets/SublimePackages/AAAPackageDev/tests/test_sublime_lib/test_path.py
  113. 0 PackageAssets/SublimePackages/AAAPackageDev/tests/test_sublime_lib/test_view/__init__.py
  114. +6 −0 PackageAssets/SublimePackages/AAAPackageDev/tests/test_sublime_lib/test_view/test_sels.py
  115. +63 −0 PackageAssets/SublimePackages/AAAPackageDev/tests/test_sublime_lib/test_view/test_view.py
  116. BIN PackageAssets/SublimePackages/Package Control.sublime-package
  117. +3 −0 PackageAssets/SublimePackages/PowerShell/.gitignore
  118. +16 −0 PackageAssets/SublimePackages/PowerShell/.hgignore
  119. +7 −0 PackageAssets/SublimePackages/PowerShell/LICENSE.txt
  120. +9 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(beg) scriptblock begin clause.sublime-snippet
  121. +12 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(comm) comment block.sublime-snippet
  122. +10 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(elif) elseif {...}.sublime-snippet
  123. +8 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(elifi) elseif in-line.sublime-snippet
  124. +10 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(else) else {...}.sublime-snippet
  125. +8 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(elsei) else in-line.sublime-snippet
  126. +9 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(end) scriptblock end clause.sublime-snippet
  127. +10 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(fil) new filter.sublime-snippet
  128. +10 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(fun) new function.sublime-snippet
  129. +10 −0 ...eAssets/SublimePackages/PowerShell/Snippets/(here) heredoc string (single quoted).sublime-snippet
  130. +10 −0 ...Assets/SublimePackages/PowerShell/Snippets/(hhere) heredoc string (double quoted).sublime-snippet
  131. +10 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(if) if {...}.sublime-snippet
  132. +13 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(ifelse) if {...} else {...}.sublime-snippet
  133. +8 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(ifi) if in-line.sublime-snippet
  134. +8 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(mydocs) get path to My Documents.sublime-snippet
  135. +9 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(proc) scriptblock process clause.sublime-snippet
  136. +8 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(sub) $(...) complex subexpression.sublime-snippet
  137. +9 −0 PackageAssets/SublimePackages/PowerShell/Snippets/(tmp) Create Temp File.sublime-snippet
  138. +7 −0 PackageAssets/SublimePackages/PowerShell/Snippets/Heredoc single quote for real.sublime-snippet
  139. +7 −0 PackageAssets/SublimePackages/PowerShell/Snippets/Heredoc single quote.sublime-snippet
  140. +5 −0 PackageAssets/SublimePackages/PowerShell/Snippets/Path to Current Module.sublime-snippet
  141. +17 −0 PackageAssets/SublimePackages/PowerShell/Snippets/Powershell.sublime-completions
  142. +5 −0 PackageAssets/SublimePackages/PowerShell/Snippets/Set PSDebug Step.sublime-snippet
  143. +42 −0 PackageAssets/SublimePackages/PowerShell/Support/Comments.tmPreferences
  144. +3 −0 PackageAssets/SublimePackages/PowerShell/Support/Powershell.sublime-build
  145. +389 −0 PackageAssets/SublimePackages/PowerShell/Support/PowershellSyntax.JSON-tmLanguage
  146. +4 −0 PackageAssets/SublimePackages/PowerShell/Support/PowershellSyntax.sublime-settings
  147. +609 −0 PackageAssets/SublimePackages/PowerShell/Support/PowershellSyntax.tmLanguage
  148. +10 −0 PackageAssets/SublimePackages/PowerShell/bin/CleanUp.ps1
  149. +23 −0 PackageAssets/SublimePackages/PowerShell/bin/Generate-BuiltInVariablePattern.ps1
  150. +37 −0 PackageAssets/SublimePackages/PowerShell/bin/Generate-BuiltinCommandletPattern.ps1
  151. +18 −0 PackageAssets/SublimePackages/PowerShell/bin/MakeRelease.ps1
  152. +199 −0 PackageAssets/SublimePackages/PowerShell/bin/test-file.ps1
  153. +7 −0 PackageAssets/SublimePackages/PowerShell/manifest.in
  154. +1 −0 PackageAssets/SublimePackages/PowerShell/package-metadata.json
  155. +591 −0 PackageAssets/SublimePackages/PowerShell/setup.py
  156. +13 −0 PackageAssets/SublimePackages/PowershellUtils/.hgignore
  157. +21 −0 PackageAssets/SublimePackages/PowershellUtils/LICENSE.TXT
  158. +109 −0 PackageAssets/SublimePackages/PowershellUtils/README.rst
  159. +11 −0 PackageAssets/SublimePackages/PowershellUtils/bin/CleanUp.ps1
  160. +33 −0 PackageAssets/SublimePackages/PowershellUtils/bin/MakeRelease.ps1
  161. +235 −0 PackageAssets/SublimePackages/PowershellUtils/executepscommand.py
  162. BIN PackageAssets/SublimePackages/PowershellUtils/executepscommand.pyc
  163. +5 −0 PackageAssets/SublimePackages/PowershellUtils/manifest.in
  164. +1 −0 PackageAssets/SublimePackages/PowershellUtils/package-metadata.json
  165. +11 −0 PackageAssets/SublimePackages/PowershellUtils/powershell-utils.sublime-project
  166. +589 −0 PackageAssets/SublimePackages/PowershellUtils/setup.py
  167. BIN PackageAssets/SublimePackages/PowershellUtils/setup.pyc
  168. +7 −0 PackageAssets/SublimePackages/PowershellUtils/sublimepath.py
  169. BIN PackageAssets/SublimePackages/PowershellUtils/sublimepath.pyc
  170. +6 −0 PackageAssets/SublimePackages/PowershellUtils/tests/_setuptestenv.py
  171. +7 −0 PackageAssets/SublimePackages/PowershellUtils/tests/run-tests.ps1
  172. +17 −0 PackageAssets/SublimePackages/PowershellUtils/tests/sublime.py
  173. +42 −0 PackageAssets/SublimePackages/PowershellUtils/tests/sublimeplugin.py
  174. +20 −0 PackageAssets/SublimePackages/PowershellUtils/tests/sublimeunittest.py
  175. +116 −0 PackageAssets/SublimePackages/PowershellUtils/tests/test_executepscommand.py
  176. +37 −0 PackageAssets/SublimePackages/PowershellUtils/tests/test_sublimepath.py
  177. +103 −0 PackageAssets/console.xml
  178. +26 −0 Readme.md
  179. +52 −0 Utilities.ps1
  180. +3 −0 bootstrap.bat
  181. +44 −0 bootstrap.ps1
  182. +8 −0 bootstrapper.sublime-project
@@ -0,0 +1,2 @@
*.sublime-workspace
*.exe
@@ -0,0 +1,16 @@
syntax: glob
*.pyc
_*.txt
*.cache
*.sublime-project
*.sublime-workspace
sample-grammar.js
Manifest
MANIFEST
dist/
build/
data/
Doc/
_ref/
@@ -0,0 +1,9 @@
import sublime
import os
import sys
# Makes sublime_lib package available for all packages.
if not os.path.join(sublime.packages_path(), "AAAPackageDev/Lib") in sys.path:
sys.path.append(os.path.join(sublime.packages_path(), "AAAPackageDev/Lib"))
print "[AAAPackageDev] Added sublime_lib to sys.path."
Binary file not shown.
@@ -0,0 +1 @@
The license under which this package is released.
@@ -0,0 +1,63 @@
KEY_UP = "up"
KEY_DOWN = "down"
KEY_RIGHT = "right"
KEY_LEFT = "left"
KEY_INSERT = "insert"
KEY_HOME = "home"
KEY_END = "end"
KEY_PAGEUP = "pageup"
KEY_PAGEDOWN = "pagedown"
KEY_BACKSPACE = "backspace"
KEY_DELETE = "delete"
KEY_TAB = "tab"
KEY_ENTER = "enter"
KEY_PAUSE = "pause"
KEY_ESCAPE = "escape"
KEY_SPACE = "space"
KEY_KEYPAD0 = "keypad0"
KEY_KEYPAD1 = "keypad1"
KEY_KEYPAD2 = "keypad2"
KEY_KEYPAD3 = "keypad3"
KEY_KEYPAD4 = "keypad4"
KEY_KEYPAD5 = "keypad5"
KEY_KEYPAD6 = "keypad6"
KEY_KEYPAD7 = "keypad7"
KEY_KEYPAD8 = "keypad8"
KEY_KEYPAD9 = "keypad9"
KEY_KEYPAD_PERIOD = "keypad_period"
KEY_KEYPAD_DIVIDE = "keypad_divide"
KEY_KEYPAD_MULTIPLY = "keypad_multiply"
KEY_KEYPAD_MINUS = "keypad_minus"
KEY_KEYPAD_PLUS = "keypad_plus"
KEY_KEYPAD_ENTER = "keypad_enter"
KEY_CLEAR = "clear"
KEY_F1 = "f1"
KEY_F2 = "f2"
KEY_F3 = "f3"
KEY_F4 = "f4"
KEY_F5 = "f5"
KEY_F6 = "f6"
KEY_F7 = "f7"
KEY_F8 = "f8"
KEY_F9 = "f9"
KEY_F10 = "f10"
KEY_F11 = "f11"
KEY_F12 = "f12"
KEY_F13 = "f13"
KEY_F14 = "f14"
KEY_F15 = "f15"
KEY_F16 = "f16"
KEY_F17 = "f17"
KEY_F18 = "f18"
KEY_F19 = "f19"
KEY_F20 = "f20"
KEY_SYSREQ = "sysreq"
KEY_BREAK = "break"
KEY_CONTEXT_MENU = "context_menu"
KEY_BROWSER_BACK = "browser_back"
KEY_BROWSER_FORWARD = "browser_forward"
KEY_BROWSER_REFRESH = "browser_refresh"
KEY_BROWSER_STOP = "browser_stop"
KEY_BROWSER_SEARCH = "browser_search"
KEY_BROWSER_FAVORITES = "browser_favorites"
KEY_BROWSER_HOME = "browser_home"
@@ -0,0 +1,25 @@
import sublime
import os
FTYPE_EXT_KEYMAP = ".sublime-keymap"
FTYPE_EXT_COMPLETIONS = ".sublime-completions"
FTYPE_EXT_SNIPPET = ".sublime-snippet"
FTYPE_EXT_BUILD = ".sublime-build"
FTYPE_EXT_SETTINGS = ".sublime-settings"
FTYPE_EXT_TMPREFERENCES = ".tmPreferences"
FTYPE_EXT_TMLANGUAGE = ".tmLanguage"
def root_at_packages(*leafs):
"""Combines leafs with path to Sublime's Packages folder.
"""
return os.path.join(sublime.packages_path(), *leafs)
def root_at_data(*leafs):
"""Combines leafs with Sublime's ``Data`` folder.
"""
data = os.path.join(os.path.split(sublime.packages_path())[0])
return os.path.join(data, *leafs)
@@ -0,0 +1 @@
from ._view import *
@@ -0,0 +1,43 @@
import contextlib
def append(view, text):
"""Appends text to view."""
with in_one_edit(view) as edit:
view.insert(edit, view.size(), text)
@contextlib.contextmanager
def in_one_edit(view):
"""Context manager to group edits in a view.
Example:
...
with in_one_edit(view):
...
...
"""
try:
edit = view.begin_edit()
yield edit
finally:
view.end_edit(edit)
def has_sels(view):
"""Returns ``True`` if ``view`` has one selection or more.``
"""
return len(view.sel()) > 0
def has_file_ext(view, ext):
"""Returns ``True`` if view has file extension ``ext``.
``ext`` may be specified with or without leading ``.``.
"""
if not view.file_name(): return False
if not ext.strip().replace('.', ''): return False
if not ext.startswith('.'):
ext = '.' + ext
return view.file_name().endswith(ext)
@@ -0,0 +1,30 @@
[
{
"id": "tools",
"children":
[
{
"id": "packages",
"caption": "Packages",
"children":
[
{
"caption": "Package Development",
"children":
[
{ "caption": "New Package…", "command": "new_package" },
{ "caption": "Delete Package…", "command": "delete_package" },
{ "caption": "-" },
{ "caption": "New Syntax Definition", "command": "new_syntax_def" },
{ "caption": "New Syntax Definition from Buffer", "command": "new_syntax_def_from_buffer" },
{ "caption": "-" },
{ "caption": "New Raw Snippet…", "command": "new_raw_snippet" },
{ "caption": "New Raw Snippet from Snippet…", "command": "new_raw_snippet_from_snippet" },
{ "caption": "Generate Snippet from Raw Snippet", "command": "generate_snippet_from_raw_snippet" }
]
}
]
}
]
}
]
@@ -0,0 +1,156 @@
=============
AAAPackageDev
=============
status: beta
Overview
========
AAAPackageDev helps create and edit snippets, completions files, build systems
and other Sublime Text extensions.
The general workflow looks like this:
- run ``new_*`` command (``new_raw_snippet``, ``new_completions``, ``new_syntax_def``...)
- edit file (with specific snippets, completions, higlighting, build systems...)
- save file
AAAPackageDev ``new_*`` commands are typically accessible through the *Command
Palette* (``Ctrl+Shift+P``).
Getting Started
===============
#. Download and install `AAAPackageDev`_. (See `installation instructions`_ for ``.sublime-package`` files.)
#. Access commands from **Tools | Packages | Package Development** or the *Command Palette* (``Ctrl+Shift+P``).
.. _AAAPackageDev: https://bitbucket.org/guillermooo/aaapackagedev/downloads/AAAPackageDev.sublime-package
.. _installation instructions: http://sublimetext.info/docs/en/extensibility/packages.html#installation-of-packages
Syntax Definition Development
=============================
In AAAPackageDev, syntax definitions are written in JSON. Because Sublime Text
uses ``.tmLanguage`` files, though, they need to be converted before use. The
conversion is done through the included build system ``Json to tmLanguage``.
Creating a New Syntax Definition
********************************
#. Create new template (through **Tools | Packages | Package Development**) or the *Command Palette*
#. Select ``Json to tmLanguage`` build system from **Tools | Build System**
#. Press ``F7``
To reload changes to a syntax definition, you must restart Sublime Text.
Other included resources for syntax definition development:
* Snippets
Package Development
===================
Resources for package development are in a very early stage.
Commands
********
``new_package()``
Window command. Prompts for a name and creates a new package skeleton in ``Packages``.
``delete_package()``
Window command. Opens file browser at ``Packages``.
.. Completions
.. -----------
..
.. * sublime text plugin dev (off by default)
.. Will clutter your completions list in any kind of python dev.
.. To turn on, change scope selector so ``source.python``.
Build System Development
========================
* Syntax definition for ``.build-system`` files.
Key Map Development
===================
* Syntax definition for ``.sublime-keymap`` files.
* Completions
* Snippets
Snippet Development
===================
AAAPackageDev provides a means to edit snippets using snippets. These snippets
are called *raw snippets*. You can use snippets and snippet-like syntax in many
files, but if you want to create ``.sublime-snippet`` files, you need to convert
raw snippets first. This converion is done with a command.
Inside ``AAAPackageDev/Support`` you will find a ``.sublime-keymap`` file.
The key bindings in it are included for reference. If you want them to work,
you need to copy the contents over to your personal ``.sublime-keymap`` file
under ``Packages/User``.
Creating Snippets
*****************
#. Create new raw snippet with included commands (**Tools | Packages | Package Development** or *Command Palette*)
#. Edit snippet
#. If needed, convert to ``.sublime-snippet`` with included command
You can use raw snippets directly in some files, like ``.sublime-completions`` files.
Completions Development
=======================
* Syntax definition for ``.sublime-completions`` files
* Snippets
You can use raw snippets directly in the ``contents`` element of a trigger-based
completion.
Settings File Development
=========================
* Syntax definition for ``.sublime-settings`` files
* Snippets
About Snippets in AAAPackageDev
===============================
The ``AAAPackageDev/Snippets`` folder contains many snippets for all kinds of
development mentioned above. These snippets follow memorable rules to make their
use easy.
The snippets used more often have short tab triggers like ``f`` (*field*),
``c`` (*completion*), ``k`` (*key binding*), etc. In cases where increasingly
complex items of a similar kind might exist (numbered fields, fields with place
holders and fields with substitutions in the case of snippets), their tab triggers
will consist in a repeated character, like ``f``, ``ff`` and ``fff``.
As a rule of thumb, the more complex the snippet, the longer its tab trigger.
Also, ``i`` (for *item*) is often a generic synonym for the most common snippet
in a type of file. In such cases, ``ii`` and even longer tab triggers might work
too for consistency.
Sublime Library
===============
AAAPackageDev includes ``sublime_lib``, a Python package with utilities for
plugin developers. Once AAAPackageDev is installed, ``sublime_lib`` will be
importable from any plugin residing in ``Packages``.
@@ -0,0 +1,5 @@
0.5
- Escaped regexp syntax def. (For regexes in JSON files.)
- Improvements to syntax defs for .sublime-keymap and .sublime-build.
- .sublime-build files will load their specific syntax automatically.
- Improved documentation.
@@ -0,0 +1,8 @@
{
"scope": "source.sublimecommands",
"completions": [
{ "trigger": "c", "contents": "{ \"caption\": \"$1\", \"command\": \"$2\" }" },
{ "trigger": "i", "contents": "{ \"caption\": \"$1\", \"command\": \"$2\" }" }
]
}
@@ -0,0 +1,8 @@
{
"scope": "source.sublimecompletions",
"completions": [
{ "trigger": "c", "contents": "{ \"trigger\": \"$1\", \"contents\": \"$2\" }$0" },
{ "trigger": "i", "contents": "{ \"triggers\": \"$1\", \"contents\": \"$2\" }$0" }
]
}
@@ -0,0 +1,7 @@
<snippet>
<content><![CDATA["args": {
"$1": "$2"$0
}]]></content>
<scope>source.sublimekeymap</scope>
<tabTrigger>args</tabTrigger>
</snippet>
Oops, something went wrong.

0 comments on commit 2d96de0

Please sign in to comment.