-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from btbytes/master
Add the menu to context menu instead of application menu as per norms.
- Loading branch information
Showing
5 changed files
with
44 additions
and
45 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ | ||
{"caption" : "DFormat: format D code", "command" : "dformat"} | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ | ||
{ "keys": ["ctrl+alt+f"], "command": "dformat" } | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
{ | ||
"keys": ["super+.", "super+f"], | ||
"command": "dformat", | ||
"context": [{ "key": "selector", "operator": "equal", "operand": "source.d" }] | ||
} | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,20 @@ | ||
[ | ||
{ | ||
"caption": "Preferences", | ||
"mnemonic": "n", | ||
"id": "preferences", | ||
"children": [ | ||
{ | ||
"caption": "Package Settings", | ||
"mnemonic": "P", | ||
"id": "package-settings", | ||
"children": [ | ||
{ | ||
"caption": "DFormat", | ||
"children": [ | ||
{ | ||
"command": "open_file", | ||
"args": {"file": "${packages}/DFormat/dformat.sublime-settings"}, | ||
"caption": "Settings – Default" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"caption":"DLang", | ||
"id": "dlang", | ||
"children": | ||
[ | ||
{ | ||
"caption": "DFormat", "command": "dformat" | ||
} | ||
] | ||
} | ||
] | ||
[ { "caption" : "Preferences", | ||
"children" : [ { "caption" : "Package Settings", | ||
"children" : [ { "caption" : "DFormat", | ||
"children" : [ { "args" : { "file" : "${packages}/DFormat/dformat.sublime-settings" }, | ||
"caption" : "Settings – Default", | ||
"command" : "open_file" | ||
}, | ||
{ "args" : { "file" : "${packages}/User/dformat.sublime-settings" }, | ||
"caption" : "Settings – User", | ||
"command" : "open_file" | ||
} | ||
] | ||
} ], | ||
"id" : "package-settings", | ||
"mnemonic" : "P" | ||
} ], | ||
"id" : "preferences", | ||
"mnemonic" : "n" | ||
} | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
# Format D source code in Sublime Text | ||
# `dfmt-sublime` - Format D source code in Sublime Text | ||
|
||
## dfmt-sublime | ||
Integration of [dfmt](https://github.com/Hackerpilot/dfmt) with Sublime Text 2/3. | ||
|
||
Integration of [**dfmt**](https://github.com/Hackerpilot/dfmt) with Sublime Text 2/3. | ||
## Notes | ||
|
||
**Note 1:** You need `dfmt` placed in your PATH. | ||
1. You need `dfmt` placed in your PATH. | ||
2. Specify path to your [.editorconfig](https://github.com/Hackerpilot/dfmt/blob/master/.editorconfig) file (`Preferences` -> `Package Settings` -> `DFormat` -> `Settings - User`) | ||
|
||
**Note 2:** Specify path to your [.editorconfig](https://github.com/Hackerpilot/dfmt/blob/master/.editorconfig) file (`Preferences` -> `Package Settings` -> `DFormat` -> `Settings - Default`) | ||
## Installation | ||
|
||
**Note 3:** I have only Windows, so can't test it on other systems... | ||
Use [Package Control](https://packagecontrol.io/packages/DFormat). | ||
|
||
**Note 4:** I have no experience with Python before. | ||
|
||
## Usage | ||
|
||
## Installation | ||
Key-bindings to format the current buffer: | ||
|
||
Please use [Package Control](https://packagecontrol.io/packages/DFormat). | ||
* Windows and Linux - `ctrl+alt+f` | ||
* Mac - `super+.` followed by `super+f` |