Skip to content

Commit

Permalink
change default shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
Pay Liu committed Sep 9, 2013
1 parent a711a6b commit cd91dae
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions README.md
Expand Up @@ -8,7 +8,10 @@ Xcode plugin to plus extra feature.
# Usage
### Delete Line

The default short-cut is `^d`, if you would like change it, please refer to [Custom Shortcut](#custom-shortcut)
The default short-cut is `⌘D`, like in Eclipse.

This shortcut should conflict to `Duplicate`, just remove it form `Key Bindings`.
Or you would like to set different shortcut, please refer to [Custom Shortcut](#custom-shortcut).

- Xcode > menu > Edit > `Delete Line`

Expand All @@ -35,16 +38,21 @@ $HOME/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/XcodePlus\ De

# Custom Shortcut

If you want the shortcut of `delete-line` like Eclipse using `⌘D`.
#### Resovle Conflict of Key Bindings

- open `System Preferences` > `Keyboard` > `Keyboard Shortcuts`
![shortcut]
- If conflict, check your shortcut and remove from `Key Bindings` in Xcode.
- conflict `Duplicate`, `⌘D`
![xcode-key-bindings]
- conflict `Delete Forward`, `^D`
![xcode-key-bindings-2]

#### Use my shortcut
If you want to change the shortcut of `delete-line` you like.

- open `System Preferences` > `Keyboard` > `Keyboard Shortcuts`
- At Step#5, press the shoutcut you want.
![shortcut]

#License
MIT License

Expand Down
Binary file modified screenshot/deleteline.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -66,7 +66,7 @@ - (void) applicationDidFinishLaunching:(NSNotification *)notification
NSMenuItem *newMenuItem = [[NSMenuItem alloc] initWithTitle:@"Delete Line" action:@selector(deleteLine:) keyEquivalent:@"d"];

[newMenuItem setTarget:self];
[newMenuItem setKeyEquivalentModifierMask:NSControlKeyMask];
[newMenuItem setKeyEquivalentModifierMask:NSCommandKeyMask];
[[editMenuItem submenu] addItem:newMenuItem];
[newMenuItem release];
}
Expand Down

0 comments on commit cd91dae

Please sign in to comment.