Created
September 27, 2012 00:47
-
-
Save saltnlight5/3791524 to your computer and use it in GitHub Desktop.
Sublime Text 2
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
Show hidden characters
// A build script to run shell script in Windows using cygwin. | |
// NOTE that a selector is "source.shell", not ".sh"! | |
{ | |
"cmd": ["C:/cygwin/bin/bash.exe", "--login", "$file"], | |
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
"selector": "source.shell" | |
} |
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
// Groovy build script. | |
{ | |
"cmd": ["groovy", "$file"], | |
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
"selector": "source.groovy", | |
"windows": | |
{ | |
"cmd": ["C:/apps/groovy-2.0.1/bin/groovy.bat", "$file"] | |
}, | |
// NOTE: We can't use env in the cmd path? | |
"osx": | |
{ | |
"cmd": ["/Users/zemian/apps/groovy/bin/groovy", "$file"], | |
"env": { | |
"JAVA_HOME": "$HOME/apps/jdk" | |
} | |
} | |
} |
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
{ | |
"cmd": ["C:\\apps\\nailgun-0.7.1\\ng.exe", "groovy.ui.GroovyMain", "$file"] | |
} |
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
/* | |
// Add key mapping in Default.sublime-keymap file | |
[ | |
{ "keys": ["f5"], "command": "new_note_file" } | |
] | |
*/ | |
import sublime, sublime_plugin | |
import time, os.path | |
class NewNoteFile(sublime_plugin.WindowCommand): | |
def run(self): | |
ttamp = time.strftime('%Y%m%d-%H%M%S', time.localtime()) | |
v = self.window.new_file() | |
v.settings().set('default_dir', os.path.expanduser('~/notes')) | |
v.set_syntax_file('Packages/Markdown/Markdown.tmLanguage') | |
v.set_name(ttamp + '.md') |
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
<snippet> | |
<content><![CDATA[ | |
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> | |
<bean id="${1:myBean}" class="${2:MyBean}"> | |
<property name="${3:prop}" value="${4:testValue}"/> | |
</bean> | |
</beans> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>springxml</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.xml</scope> --> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment