Is it possible to change the key binding for completion, everywhere? Unfortunately, I'm a converting Emacs user, and very used to hitting Alt-/ to do completion...
I had a brief look in the manual, but I couldn't see an obvious way to do this.
Thanks, -Dom
On Feb 6, 2006, at 5:17 PM, Dominic Mitchell wrote:
Is it possible to change the key binding for completion, everywhere? Unfortunately, I'm a converting Emacs user, and very used to hitting Alt-/ to do completion...
I had a brief look in the manual, but I couldn't see an obvious way to do this.
The appendix details how to modify ~/Library/KeyBindings/ DefaultKeyBinding.dict. I modified the completion key with the following:
"^n" = "nextCompletion:";
_matt
On Mon, Feb 06, 2006 at 05:34:12PM -0700, Matthew Gilbert wrote:
On Feb 6, 2006, at 5:17 PM, Dominic Mitchell wrote:
Is it possible to change the key binding for completion, everywhere? Unfortunately, I'm a converting Emacs user, and very used to hitting Alt-/ to do completion...
I had a brief look in the manual, but I couldn't see an obvious way to do this.
The appendix details how to modify ~/Library/KeyBindings/ DefaultKeyBinding.dict. I modified the completion key with the following:
"^n" = "nextCompletion:";
Ah, cool. I knew that I was missing something. Thanks very much, I'll give that a go when I get home tonight.
-Dom
On Mon, Feb 06, 2006 at 05:34:12PM -0700, Matthew Gilbert wrote:
On Feb 6, 2006, at 5:17 PM, Dominic Mitchell wrote:
Is it possible to change the key binding for completion, everywhere? Unfortunately, I'm a converting Emacs user, and very used to hitting Alt-/ to do completion...
I had a brief look in the manual, but I couldn't see an obvious way to do this.
The appendix details how to modify ~/Library/KeyBindings/ DefaultKeyBinding.dict. I modified the completion key with the following:
"^n" = "nextCompletion:";
Hmmm, I tried putting this in there, but it didn't seem to work.
"@/" = "nextCompletion:";
Instead, it still runs comment-line. Any idea where I could find that binding and move it? Perhaps it would be easier to just retain my fingers. :-)
-Dom
On Feb 7, 2006, at 2:50 PM, Dominic Mitchell wrote:
Hmmm, I tried putting this in there, but it didn't seem to work.
"@/" = "nextCompletion:";
Instead, it still runs comment-line. Any idea where I could find that binding and move it? Perhaps it would be easier to just retain my fingers. :-)
comment line is a command in the Source bundle. Bundle commands take precedence over generic system commands. So you would have to open the Source Bundle in the bundle editor, and disable the key equivalent for the comment-line command.
-Dom
Haris
On 7/2/2006, at 22:12, Charilaos Skiadas wrote:
Hmmm, I tried putting this in there, but it didn't seem to work. "@/" = "nextCompletion:"; Instead, it still runs comment-line. Any idea where I could find that binding and move it? [...]
comment line is a command in the Source bundle. Bundle commands take precedence over generic system commands [...]
Unfortunately though, the way Cocoa apps work is that the key bindings file is used by the control which has focus, but before this control sees the key event, the menu will resolve keys and send to the proper target, and the menu manager seems to eat most keys with the command modifier, so these are never sent to the view.
Effectively this means that one cannot use the command modifier for key bindings in the DefaultKeyBindings.dict file.
It is however possible to record a macro that does the Next Completion and save that macro with a key binding that has the command modifier key.
I may eventually add some workarounds for how this currently work, so that the active control gets to see the keys before the menu manager (although this isn't always ideal).
On Tue, Feb 7, at 2:50 PM, Dominic Mitchell wrote:
On Mon, Feb 06, 2006 at 05:34:12PM -0700, Matthew Gilbert wrote:
On Feb 6, 2006, at 5:17 PM, Dominic Mitchell wrote:
Is it possible to change the key binding for completion, everywhere? Unfortunately, I'm a converting Emacs user, and very used to hitting Alt-/ to do completion...
I had a brief look in the manual, but I couldn't see an obvious way to do this.
The appendix details how to modify ~/Library/KeyBindings/ DefaultKeyBinding.dict. I modified the completion key with the following:
"^n" = "nextCompletion:";
Hmmm, I tried putting this in there, but it didn't seem to work.
"@/" = "nextCompletion:";
If you want 'Alt-/', that should be
"~/" = "nextCompletion:";
Gerd
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http:// www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>~/</key> <string>nextCompletion:</string> </dict> </plist>
Gerd Knops wrote:
On Tue, Feb 7, at 2:50 PM, Dominic Mitchell wrote:
Hmmm, I tried putting this in there, but it didn't seem to work.
"@/" = "nextCompletion:";
If you want 'Alt-/', that should be
"~/" = "nextCompletion:";
Truth be told, I'm still adjusting to a Mac keyboard[1] so Alt translates as "key next to the space bar".
I'll try doing what Allan suggested and recording a macro to see if that does the trick.
Thanks, -Dom
[1] I curse and spit at Apple's inability to put the backslash in the right place!
On 8 Feb 2006, at 06:32, Dominic Mitchell wrote:
[1] I curse and spit at Apple's inability to put the backslash in the right place!
You get used to it and then it's hard to go back :)
In fact you'll get /really/ used to the main shortcuts being bound to the key right next to the space bar.