forked from textmate/ruby.tmbundle
-
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.
Currently with help for the new Reformat Document command.
- Loading branch information
1 parent
59724dc
commit 4a0254f
Showing
3 changed files
with
59 additions
and
0 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,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>beforeRunningCommand</key> | ||
<string>nop</string> | ||
<key>command</key> | ||
<string>#!/bin/bash | ||
. "$TM_SUPPORT_PATH/lib/webpreview.sh" | ||
html_header "Ruby Bundle Help" "Ruby" | ||
"$TM_SUPPORT_PATH/lib/markdown_to_help.rb" \ | ||
"$TM_BUNDLE_SUPPORT/help/help.markdown" | ||
html_footer</string> | ||
<key>input</key> | ||
<string>none</string> | ||
<key>inputFormat</key> | ||
<string>text</string> | ||
<key>name</key> | ||
<string>Help</string> | ||
<key>outputCaret</key> | ||
<string>afterOutput</string> | ||
<key>outputFormat</key> | ||
<string>html</string> | ||
<key>outputLocation</key> | ||
<string>newWindow</string> | ||
<key>scope</key> | ||
<string>source.ruby</string> | ||
<key>uuid</key> | ||
<string>535AF150-5613-44DB-AB41-EBB934A5865F</string> | ||
<key>version</key> | ||
<integer>2</integer> | ||
</dict> | ||
</plist> |
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,23 @@ | ||
# Reformat Document | ||
|
||
The command “Reformat Document” – accessible via <kbd>^</kbd> + <kbd>⇧</kbd> + <kbd>H</kbd> – formats the current document using the `--auto-correct` option of [RuboCop][]. It also shows information about the formatting status in a floating tooltip. The command displays the information about the formatting status either as black text only, or as colorful text if [aha][] is accessible via `PATH`. | ||
|
||
[aha]: https://github.com/theZiz/aha | ||
[RuboCop]: https://github.com/bbatsov/rubocop | ||
|
||
## RuboCop Version | ||
|
||
Which version of [RuboCop][] “Reformat Document” uses depends on your environment. The command will try the options below in the given order. | ||
|
||
1. The value of the command specified via `TM_RUBOCOP`. | ||
2. An executable version of RuboCop accessible via `bin/rubocop`. | ||
3. The version of `rubocop` installed via [Bundler][]. | ||
4. Any other version of `rubocop` accessible via, | ||
- `/usr/local/bin/rubocop`, | ||
- `$HOME/.rbenv/shims/rubocop` | ||
- or the locations in your `PATH`. | ||
|
||
“Reformat Document” prefers [RVM][] install locations of `rubocop` for all of the applicable options above. | ||
|
||
[Bundler]: https://bundler.io | ||
[RVM]: https://rvm.io |
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