Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added Java Doc style keyboard shortcuts and macros for inserting aste…

…risks
  • Loading branch information...
commit 74fe3e3abaa7a33fb470a10658f1963c5191d016 1 parent 6aa33d5
@atomi atomi authored
View
29 Default (Linux).sublime-keymap
@@ -1,4 +1,27 @@
[
+ // Ctrl+Alt+Shift+/ /** Java Doc style documentation
+ {
+ "keys": ["ctrl+alt+shift+/"], "command": "insert_snippet",
+ "args": { "contents": "/**\n* $0\n*/" },
+ "context": [ {"key": "selector", "operator": "equal", "operand": "source.cfscript", "match_all": true }]
+ },
+ // Java Doc auto insert asterisk
+ {
+ "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/ColdFusion/JavaDoc Add Line.sublime-macro"},
+ "context": [ {"key": "selector", "operator": "equal", "operand": "comment.block.documentation.javadoc", "match_all": true }]
+ },
+ {
+ "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "Packages/ColdFusion/JavaDoc Add Line.sublime-macro"},
+ "context": [ {"key": "selector", "operator": "equal", "operand": "comment.block.documentation.javadoc", "match_all": true }]
+ },
+ {
+ "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/ColdFusion/JavaDoc Add Line Before.sublime-macro"},
+ "context": [ {"key": "selector", "operator": "equal", "operand": "comment.block.documentation.javadoc", "match_all": true }]
+ },
+ {
+ "keys": ["ctrl+shift+k"], "command": "run_macro_file", "args": {"file": "Packages/ColdFusion/JavaDoc Delete Line.sublime-macro"},
+ "context": [ {"key": "selector", "operator": "equal", "operand": "comment.block.documentation.javadoc", "match_all": true }]
+ },
// ctrl+shift+3 <cfoutput>#SELECTION#</cfoutput>
{
"keys": ["ctrl+shift+3"], "command": "insert_snippet",
@@ -23,12 +46,6 @@
"args": { "contents": "<cfdump var=\"#${1:$SELECTION}#\" />" },
"context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
},
- // Ctrl+Shift+M ColdFusion Comment <!--- --->
- {
- "keys": ["ctrl+shift+m"], "command": "toggle_comment",
- "args": { "block": true },
- "context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
- },
// Pound/hash marks ##
{
"keys": ["#"], "command": "insert_snippet",
View
37 Default (OSX).sublime-keymap
@@ -1,34 +1,51 @@
[
- // super+shift+3 <cfoutput>#SELECTION#</cfoutput>
+ // Super+Alt+Shift+/ /** Java Doc style documentation
+ {
+ "keys": ["super+alt+shift+/"], "command": "insert_snippet",
+ "args": { "contents": "/**\n* $0\n*/" },
+ "context": [ {"key": "selector", "operator": "equal", "operand": "source.cfscript", "match_all": true }]
+ },
+ // Java Doc auto insert asterisk
+ {
+ "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/ColdFusion/JavaDoc Add Line.sublime-macro"},
+ "context": [ {"key": "selector", "operator": "equal", "operand": "comment.block.documentation.javadoc", "match_all": true }]
+ },
+ {
+ "keys": ["super+enter"], "command": "run_macro_file", "args": {"file": "Packages/ColdFusion/JavaDoc Add Line.sublime-macro"},
+ "context": [ {"key": "selector", "operator": "equal", "operand": "comment.block.documentation.javadoc", "match_all": true }]
+ },
+ {
+ "keys": ["super+shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/ColdFusion/JavaDoc Add Line Before.sublime-macro"},
+ "context": [ {"key": "selector", "operator": "equal", "operand": "comment.block.documentation.javadoc", "match_all": true }]
+ },
+ {
+ "keys": ["super+shift+k"], "command": "run_macro_file", "args": {"file": "Packages/ColdFusion/JavaDoc Delete Line.sublime-macro"},
+ "context": [ {"key": "selector", "operator": "equal", "operand": "comment.block.documentation.javadoc", "match_all": true }]
+ },
+ // Super+shift+3 <cfoutput>#SELECTION#</cfoutput>
{
"keys": ["super+shift+3"], "command": "insert_snippet",
"args": { "contents": "<cfoutput>#${0:$SELECTION}#</cfoutput>" },
"context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
},
- // super+Shift+O <cfoutput></cfoutput>
+ // Super+Shift+O <cfoutput></cfoutput>
{
"keys": ["super+shift+o"], "command": "insert_snippet",
"args": { "contents": "<cfoutput>${0:$SELECTION}</cfoutput>" },
"context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
},
- // super+Alt+R <cfscript></cfscript>
+ // Super+Alt+R <cfscript></cfscript>
{
"keys": ["super+alt+r"], "command": "insert_snippet",
"args": { "contents": "<cfscript>${0:$SELECTION}</cfscript>" },
"context": [{ "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
},
- // super+Alt+D <cfdump var="##">
+ // Super+Alt+D <cfdump var="##">
{
"keys": ["super+alt+d"], "command": "insert_snippet",
"args": { "contents": "<cfdump var=\"#${1:$SELECTION}#\" />" },
"context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
},
- // super+Shift+M ColdFusion Comment <!--- --->
- {
- "keys": ["super+shift+m"], "command": "toggle_comment",
- "args": { "block": true },
- "context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
- },
// Pound/hash marks ##
{
"keys": ["#"], "command": "insert_snippet",
View
29 Default (Windows).sublime-keymap
@@ -1,4 +1,27 @@
[
+ // Ctrl+Alt+Shift+/ /** Java Doc style documentation
+ {
+ "keys": ["ctrl+alt+shift+/"], "command": "insert_snippet",
+ "args": { "contents": "/**\n* $0\n*/" },
+ "context": [ {"key": "selector", "operator": "equal", "operand": "source.cfscript", "match_all": true }]
+ },
+ // Java Doc auto insert asterisk
+ {
+ "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/ColdFusion/JavaDoc Add Line.sublime-macro"},
+ "context": [ {"key": "selector", "operator": "equal", "operand": "comment.block.documentation.javadoc", "match_all": true }]
+ },
+ {
+ "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "Packages/ColdFusion/JavaDoc Add Line.sublime-macro"},
+ "context": [ {"key": "selector", "operator": "equal", "operand": "comment.block.documentation.javadoc", "match_all": true }]
+ },
+ {
+ "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/ColdFusion/JavaDoc Add Line Before.sublime-macro"},
+ "context": [ {"key": "selector", "operator": "equal", "operand": "comment.block.documentation.javadoc", "match_all": true }]
+ },
+ {
+ "keys": ["ctrl+shift+k"], "command": "run_macro_file", "args": {"file": "Packages/ColdFusion/JavaDoc Delete Line.sublime-macro"},
+ "context": [ {"key": "selector", "operator": "equal", "operand": "comment.block.documentation.javadoc", "match_all": true }]
+ },
// ctrl+shift+3 <cfoutput>#SELECTION#</cfoutput>
{
"keys": ["ctrl+shift+3"], "command": "insert_snippet",
@@ -23,12 +46,6 @@
"args": { "contents": "<cfdump var=\"#${1:$SELECTION}#\" />" },
"context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
},
- // Ctrl+Shift+M ColdFusion Comment <!--- --->
- {
- "keys": ["ctrl+shift+m"], "command": "toggle_comment",
- "args": { "block": true },
- "context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
- },
// Pound/hash marks ##
{
"keys": ["#"], "command": "insert_snippet",
View
8 JavaDoc Add Line Before.sublime-macro
@@ -0,0 +1,8 @@
+[
+ {"command": "move_to", "args": {"to": "hardbol"}},
+ {"command": "insert", "args": {"characters": "\n"}},
+ {"command": "move", "args": {"by": "lines", "forward": false}},
+ {"command": "reindent", "args": {"force_indent": false}},
+ {"command": "insert", "args": {"characters": "*"}},
+ {"command": "insert", "args": {"characters": " "}}
+]
View
6 JavaDoc Add Line.sublime-macro
@@ -0,0 +1,6 @@
+[
+ {"command": "move_to", "args": {"to": "hardeol"}},
+ {"command": "insert", "args": {"characters": "\n"}},
+ {"command": "insert", "args": {"characters": "*"}},
+ {"command": "insert", "args": {"characters": " "}}
+]
View
6 JavaDoc Delete Line.sublime-macro
@@ -0,0 +1,6 @@
+[
+ {"command": "expand_selection", "args": {"to": "line"}},
+ {"command": "add_to_kill_ring", "args": {"forward": true}},
+ {"command": "left_delete"},
+ {"command": "move_to", "args": {"to": "hardeol"}}
+]
Please sign in to comment.
Something went wrong with that request. Please try again.