Skip to content

Commit

Permalink
Add commands to open settings files.
Browse files Browse the repository at this point in the history
Add commands to the Default.sublime-commands file.
Update README to describe the new commands.
  • Loading branch information
Lee Dohm committed Mar 3, 2013
1 parent 6a190e4 commit 0be02d3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
14 changes: 14 additions & 0 deletions Default.sublime-commands
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,19 @@
{
"caption": "Auto Copyright: Update Copyright",
"command": "update_copyright"
},
{
"caption": "Preferences: AutoCopyright Settings – Default",
"command": "open_file", "args":
{
"file": "${packages}/AutoCopyright/AutoCopyright.sublime-settings"
}
},
{
"caption": "Preferences: AutoCopyright Settings – User",
"command": "open_file", "args":
{
"file": "${packages}/User/AutoCopyright.sublime-settings"
}
}
]
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $ git clone git://github.com/lifted-studios/AutoCopyright

## Options

Edit the settings file (it should open automatically the first time you use an Auto Copyright command):
Edit the settings file by using the `Preferences: AutoCopyright Settings - User` command in the command palette. Or it should open automatically the first time you use an AutoCopyright command.

* `"copyright message": "Copyright (c) %y by %o. All Rights Reserved."`

Expand All @@ -47,7 +47,7 @@ Edit the settings file (it should open automatically the first time you use an A

## Usage

Two functions will show up in the Command Palette under "Auto Copyright". Additionally, the Update Copyright command will automatically be called just before any file is saved.
Two functions will show up in the Command Palette under `Auto Copyright` and another two will show up under `Preferences`. Additionally, the `Update Copyright` command will automatically be called just before any file is saved.

### Insert Copyright

Expand All @@ -57,6 +57,14 @@ Adds the copyright text to the beginning of the file. It will add itself after

Updates the copyright text already present in the file, but only if the text matches, including the copyright owner name except for the year. It will update the copyright year to include all years between the original year and this one. The command will update the copyright text for any of the configured owner texts.

### Preferences: AutoCopyright Settings - Default

Opens the default AutoCopyright settings file. **This file should not be altered. Use the User settings file for your settings.**

### Preferences: AutoCopyright Settings - User

Opens the AutoCopyright user settings file. This is where you add your customizations.

## Information

Source: https://github.com/lifted-studios/AutoCopyright
Expand Down

0 comments on commit 0be02d3

Please sign in to comment.