Permalink
Browse files

Bump to v0.3

  • Loading branch information...
1 parent 0bd82c0 commit fdce700ea09baba6e03a0c0e4cc5a4b0f2213b70 @jpka committed Oct 3, 2012
Showing with 5,055 additions and 2,786 deletions.
  1. +2 −0 .zshrc
  2. +5 −1 install.zsh
  3. +1 −1 oh-my-zsh/jpka.zsh-theme
  4. +9 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/.gitignore
  5. +153 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/CoffeeScript.py
  6. +6 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/CoffeeScript.sublime-build
  7. +38 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/CoffeeScript.sublime-commands
  8. +52 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/CoffeeScript.sublime-settings
  9. +734 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/CoffeeScript.tmLanguage
  10. +34 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/CoffeeScript.tmPreferences
  11. +25 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Indent.tmPreferences
  12. +11 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Keymaps/Default (Linux).sublime-keymap
  13. +11 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Keymaps/Default (OSX).sublime-keymap
  14. +11 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Keymaps/Default (Windows).sublime-keymap
  15. +118 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/README.md
  16. +16 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Array comprehension.tmSnippet
  17. +16 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Bound Function.tmSnippet
  18. +18 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Class.tmSnippet
  19. +16 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Console Log.tmSnippet
  20. +16 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Else if.tmSnippet
  21. +16 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Else.tmSnippet
  22. +17 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Function.tmSnippet
  23. +18 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/If Else.tmSnippet
  24. +16 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/If.tmSnippet
  25. +16 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Interpolated Code.tmSnippet
  26. +16 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Object comprehension.tmSnippet
  27. +16 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Range comprehension (exclusive).tmSnippet
  28. +16 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Range comprehension (inclusive).tmSnippet
  29. +18 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Switch.tmSnippet
  30. +15 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Ternary If.tmSnippet
  31. +18 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Try Catch.tmSnippet
  32. +15 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/Unless.tmSnippet
  33. +14 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/Snippets/require.tmSnippet
  34. +10 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/changelogs/0.5.1.txt
  35. +3 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/messages.json
  36. +1 −0 sublime-text-2/Backup/20121003103147/CoffeeScript/package-metadata.json
  37. BIN sublime-text-2/Installed Packages/CoffeeScript.sublime-package
  38. BIN sublime-text-2/Packages/CSS/css_completions.pyc
  39. +1 −1 sublime-text-2/Packages/CoffeeScript/Keymaps/Default (OSX).sublime-keymap
  40. +57 −26 sublime-text-2/Packages/CoffeeScript/README.md
  41. +9 −0 sublime-text-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/.gitignore
  42. +153 −0 sublime-text-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/CoffeeScript.py
  43. +6 −0 ...ext-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/CoffeeScript.sublime-build
  44. +38 −0 ...-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/CoffeeScript.sublime-commands
  45. +52 −0 ...-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/CoffeeScript.sublime-settings
  46. +734 −0 ...e-text-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/CoffeeScript.tmLanguage
  47. +34 −0 ...ext-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/CoffeeScript.tmPreferences
  48. +25 −0 sublime-text-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Indent.tmPreferences
  49. +11 −0 ...es/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Keymaps/Default (Linux).sublime-keymap
  50. +11 −0 ...ages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Keymaps/Default (OSX).sublime-keymap
  51. +11 −0 .../CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Keymaps/Default (Windows).sublime-keymap
  52. +149 −0 sublime-text-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/README.md
  53. +16 −0 ...es/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Array comprehension.tmSnippet
  54. +16 −0 ...ackages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Bound Function.tmSnippet
  55. +18 −0 ...-text-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Class.tmSnippet
  56. +16 −0 ...2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Console Log.tmSnippet
  57. +16 −0 ...ext-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Else if.tmSnippet
  58. +16 −0 ...e-text-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Else.tmSnippet
  59. +17 −0 ...xt-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Function.tmSnippet
  60. +18 −0 ...ext-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/If Else.tmSnippet
  61. +16 −0 ...ime-text-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/If.tmSnippet
  62. +16 −0 ...ages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Interpolated Code.tmSnippet
  63. +16 −0 ...s/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Object comprehension.tmSnippet
  64. +16 −0 ...ipt/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Range comprehension (exclusive).tmSnippet
  65. +16 −0 ...ipt/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Range comprehension (inclusive).tmSnippet
  66. +18 −0 ...text-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Switch.tmSnippet
  67. +15 −0 ...-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Ternary If.tmSnippet
  68. +18 −0 ...t-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Try Catch.tmSnippet
  69. +15 −0 ...text-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/Unless.tmSnippet
  70. +14 −0 ...ext-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/Snippets/require.tmSnippet
  71. +10 −0 sublime-text-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/changelogs/0.5.1.txt
  72. +9 −0 sublime-text-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/changelogs/0.5.2.txt
  73. +4 −0 sublime-text-2/Packages/CoffeeScript/Xavura-CoffeeScript-Sublime-Plugin-f7cc700/messages.json
  74. +9 −0 sublime-text-2/Packages/CoffeeScript/changelogs/0.5.2.txt
  75. +2 −1 sublime-text-2/Packages/CoffeeScript/messages.json
  76. +1 −1 sublime-text-2/Packages/CoffeeScript/package-metadata.json
  77. +1 −3 sublime-text-2/Packages/Default/Default (Linux).sublime-mousemap
  78. +1 −1 sublime-text-2/Packages/Default/Find in Files.sublime-menu
  79. BIN sublime-text-2/Packages/Default/Meta Info Summary.cache
  80. BIN sublime-text-2/Packages/Default/Startup.cache
  81. BIN sublime-text-2/Packages/Default/Syntax Summary.cache
  82. BIN sublime-text-2/Packages/Default/comment.pyc
  83. BIN sublime-text-2/Packages/Default/copy_path.pyc
  84. BIN sublime-text-2/Packages/Default/delete_word.pyc
  85. BIN sublime-text-2/Packages/Default/detect_indentation.pyc
  86. BIN sublime-text-2/Packages/Default/duplicate_line.pyc
  87. BIN sublime-text-2/Packages/Default/echo.pyc
  88. +1 −1 sublime-text-2/Packages/Default/exec.py
  89. BIN sublime-text-2/Packages/Default/exec.pyc
  90. BIN sublime-text-2/Packages/Default/fold.pyc
  91. BIN sublime-text-2/Packages/Default/font.pyc
  92. BIN sublime-text-2/Packages/Default/goto_line.pyc
  93. BIN sublime-text-2/Packages/Default/indentation.pyc
  94. BIN sublime-text-2/Packages/Default/kill_ring.pyc
  95. BIN sublime-text-2/Packages/Default/mark.pyc
  96. BIN sublime-text-2/Packages/Default/new_templates.pyc
  97. BIN sublime-text-2/Packages/Default/open_file_settings.pyc
  98. BIN sublime-text-2/Packages/Default/open_in_browser.pyc
  99. BIN sublime-text-2/Packages/Default/paragraph.pyc
  100. BIN sublime-text-2/Packages/Default/save_on_focus_lost.pyc
  101. BIN sublime-text-2/Packages/Default/scroll.pyc
  102. BIN sublime-text-2/Packages/Default/send2trash/__init__.pyc
  103. BIN sublime-text-2/Packages/Default/send2trash/plat_other.pyc
  104. BIN sublime-text-2/Packages/Default/set_unsaved_view_name.pyc
  105. BIN sublime-text-2/Packages/Default/side_bar.pyc
  106. BIN sublime-text-2/Packages/Default/sort.pyc
  107. BIN sublime-text-2/Packages/Default/swap_line.pyc
  108. BIN sublime-text-2/Packages/Default/switch_file.pyc
  109. BIN sublime-text-2/Packages/Default/transform.pyc
  110. BIN sublime-text-2/Packages/Default/transpose.pyc
  111. BIN sublime-text-2/Packages/Default/trim_trailing_white_space.pyc
  112. BIN sublime-text-2/Packages/Diff/diff.pyc
  113. BIN sublime-text-2/Packages/HTML/encode_html_entities.pyc
  114. BIN sublime-text-2/Packages/HTML/html_completions.pyc
  115. BIN sublime-text-2/Packages/Package Control/Package Control.pyc
  116. +1 −1 sublime-text-2/Packages/User/Package Control.sublime-settings
  117. BIN sublime-text-2/Pristine Packages/CoffeeScript.sublime-package
  118. BIN sublime-text-2/Pristine Packages/Default.sublime-package
  119. +41 −2,411 sublime-text-2/Settings/Auto Save Session.sublime_session
  120. +1,873 −337 sublime-text-2/Settings/Session.sublime_session
  121. +1 −1 version
View
2 .zshrc
@@ -39,6 +39,7 @@ export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bi
# CUSTOM
unsetopt correct_all
+[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell
. ~/nvm/nvm.sh
[[ -s "/home/jpka/.rvm/scripts/rvm" ]] && source "/home/jpka/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
@@ -47,3 +48,4 @@ unsetopt correct_all
precmd () {
z --add "$(pwd -P)"
}
+
View
@@ -7,9 +7,13 @@ if ! test -d $OHMY
fi
local CUSTOM=$OHMY/custom
-
rm -r $CUSTOM
ln -s -f $PWD/oh-my-zsh $CUSTOM
+
ln -f .zshrc $HOME/.zshrc
cp z.sh $HOME/.
+
+local ST2C=$HOME/.config/sublime-text-2
+rm -r $ST2C
+ln -s -f $PWD/sublime-text-2 $ST2C
View
@@ -10,7 +10,7 @@ local rvm_ruby='%{$fg[red]%}‹$(rvm current)>'
local git_branch='$(git_prompt_info)'
local node_v=''
if which node &> /dev/null; then
- node_v='%{$fg[green]%}<$(node -v)>%{$reset_color%}'
+ node_v='%{$fg[green]%}<node $(node -v)>%{$reset_color%}'
fi
PROMPT="╭${current_dir} ${git_branch} ${rvm_ruby} ${node_v}
╰%B>%b "
@@ -0,0 +1,9 @@
+*.pyc
+*.cache
+*.sublime-project
+*.sublime-workspace
+Test.*
+code
+spec
+src
+lib
@@ -0,0 +1,153 @@
+import sublime
+import sys
+from os import path
+from subprocess import Popen, PIPE
+from sublime_plugin import TextCommand, WindowCommand
+
+settings = sublime.load_settings('CoffeeScript.sublime-settings')
+
+def run(cmd, args = [], source="", cwd = None, env = None):
+ if not type(args) is list:
+ args = [args]
+ if sys.platform == "win32":
+ proc = Popen([cmd]+args, env=env, cwd=cwd, stdout=PIPE, stdin=PIPE, stderr=PIPE, shell=True)
+ stat = proc.communicate(input=source)
+ else:
+ if env is None:
+ env = {"PATH": settings.get('binDir', '/usr/local/bin')}
+ if source == "":
+ command = [cmd]+args
+ else:
+ command = [cmd]+args+[source]
+ proc = Popen(command, env=env, cwd=cwd, stdout=PIPE, stderr=PIPE)
+ stat = proc.communicate()
+ okay = proc.returncode == 0
+ return {"okay": okay, "out": stat[0], "err": stat[1]}
+
+def brew(args, source):
+ if sys.platform == "win32":
+ args.append("-s")
+ else:
+ args.append("-e")
+ return run("coffee", args=args, source=source)
+
+def cake(task, cwd):
+ return run("cake", args=task, cwd=cwd)
+
+def isCoffee(view = None):
+ if view is None:
+ view = sublime.active_window().active_view()
+ return 'source.coffee' in view.scope_name(0)
+
+class Text():
+ @staticmethod
+ def all(view):
+ return view.substr(sublime.Region(0, view.size()))
+ @staticmethod
+ def sel(view):
+ text = []
+ for region in view.sel():
+ if region.empty():
+ continue
+ text.append(view.substr(region))
+ return "".join(text)
+
+ @staticmethod
+ def get(view):
+ text = Text.sel(view)
+ if len(text) > 0:
+ return text
+ return Text.all(view)
+
+class CompileCommand(TextCommand):
+ def is_enabled(self):
+ return isCoffee(self.view)
+
+ def run(self, *args, **kwargs):
+ result = run("coffee", args=['-b', '-c', self.view.file_name()])
+
+ if result['okay'] is True:
+ status = 'Compilation Succeeded'
+ else:
+ status = 'Compilation Failed'
+
+ sublime.status_message(status)
+
+class CompileAndDisplayCommand(TextCommand):
+ def is_enabled(self):
+ return isCoffee(self.view)
+
+ def run(self, edit, **kwargs):
+ opt = kwargs["opt"]
+ res = brew(['-b', opt], Text.get(self.view))
+ output = self.view.window().new_file()
+ output.set_scratch(True)
+ if opt == '-p':
+ output.set_syntax_file('Packages/JavaScript/JavaScript.tmLanguage')
+ if res["okay"] is True:
+ output.insert(edit, 0, res["out"])
+ else:
+ output.insert(edit, 0, res["err"].split("\n")[0])
+
+class CheckSyntaxCommand(TextCommand):
+ def is_enabled(self):
+ return isCoffee(self.view)
+
+ def run(self, edit):
+ res = brew(['-b', '-p'], Text.get(self.view))
+ if res["okay"] is True:
+ status = 'Valid'
+ else:
+ status = res["err"].split("\n")[0]
+ sublime.status_message('Syntax %s' % status)
+
+class RunScriptCommand(WindowCommand):
+ def finish(self, text):
+ if text == '':
+ return
+ text = "{puts, print} = require 'util'\n" + text
+ res = brew(['-b'], text)
+ if res["okay"] is True:
+ output = self.window.new_file()
+ output.set_scratch(True)
+ edit = output.begin_edit()
+ output.insert(edit, 0, res["out"])
+ output.end_edit(edit)
+ else:
+ sublime.status_message('Syntax %s' % res["err"].split("\n")[0])
+
+ def run(self):
+ sel = Text.sel(sublime.active_window().active_view())
+ if len(sel) > 0:
+ if not isCoffee(): return
+ self.finish(sel)
+ else:
+ self.window.show_input_panel('Coffee >', '', self.finish, None, None)
+
+class RunCakeTaskCommand(WindowCommand):
+ def finish(self, task):
+ if task == '':
+ return
+
+ if not self.window.folders():
+ cakepath = path.dirname(self.window.active_view().file_name())
+ else:
+ cakepath = path.join(self.window.folders()[0], 'Cakefile')
+ if not path.exists(cakepath):
+ cakepath = path.dirname(self.window.active_view().file_name())
+
+ if not path.exists(cakepath):
+ return sublime.status_message("Cakefile not found.")
+
+ res = cake(task, cakepath)
+ if res["okay"] is True:
+ if "No such task" in res["out"]:
+ msg = "doesn't exist"
+ else:
+ msg = "suceeded"
+ else:
+ msg = "failed"
+ sublime.status_message("Task %s - %s." % (task, msg))
+
+ def run(self):
+ self.window.show_input_panel('Cake >', '', self.finish, None, None)
@@ -0,0 +1,6 @@
+{
+ "cmd": ["cake", "sbuild"]
+, "path": "/usr/local/bin:$PATH"
+, "selector": "source.coffee"
+, "working_dir": "$project_path"
+}
@@ -0,0 +1,38 @@
+[
+ {
+ "caption": "Coffee: Check Syntax"
+ , "command": "check_syntax"
+ }
+, {
+ "caption": "Coffee: Run Script"
+ , "command": "run_script"
+ }
+, {
+ "caption": "Coffee: Run Cake Task"
+ , "command": "run_cake_task"
+ }
+, {
+ "caption": "Coffee: Compile File"
+ , "command": "compile"
+ }
+, {
+ "caption": "Coffee: Display JavaScript"
+ , "command": "compile_and_display", "args": {"opt": "-p"}
+ }
+, {
+ "caption": "Coffee: Display Lexer Tokens"
+ , "command": "compile_and_display", "args": {"opt": "-t"}
+ }
+, {
+ "caption": "Coffee: Display Parse Tree"
+ , "command": "compile_and_display", "args": {"opt": "-n"}
+ }
+, {
+ "caption": "Coffee: Toggle Watch Mode"
+ , "command": "toggle_watch"
+ }
+, {
+ "caption": "Coffee: Toggle Output Panel"
+ , "command": "toggle_output_panel"
+ }
+]
@@ -0,0 +1,52 @@
+{
+ /*
+ The directory containing your coffee binary. Usually
+ /usr/local/bin.
+ */
+ "binDir": "/usr/local/bin"
+
+ /*
+ Directories where the watcher will look for .js (lib)
+ and .coffee (src) files.
+ */
+, "libDir": ""
+, "srcDir": ""
+
+ /*
+ Compile without the top-level function wrapper (coffee -b).
+ */
+
+, "noWrapper": true
+
+ /*
+ Globally enable/disable watch mode.
+ */
+, "watchEnabled": true
+
+ /*
+ Where output from the watcher (coffee -w) will be sent to.
+
+ panel - a custom, toggleable (alt+shift+z) panel
+ status - to the status bar
+ console - to the python console
+
+ log file? probably
+ growl? maybe
+ */
+, "watchOutputMode": "panel"
+
+, "watchAutoStart": false
+
+ /*
+ Output success (compiled) or failure (error) messages, or both, or neither...
+ */
+, "watchOutputOnSuccess": true
+, "watchOutputOnFailure": true
+
+ /*
+ Watched files containing errors will have their view focused
+ and the error highlighted, regardless of watchOutputOnFailure
+ setting above.
+ */
+, "watchHighlightErrors": true
+}
Oops, something went wrong.

0 comments on commit fdce700

Please sign in to comment.