Mac-OSX Text Navigation

0

In the terminal I'm able to hit option+b to move back a word. In any GUI app I get an integral: ∫ I know most of the emacs motions so moving around would be a lot easier if I could use the alt/meta/option movements. opiton+e doesn't work either.

Any ideas?

Thanks!

Justin Thomas

Posted 2013-04-07T16:36:29.903

Reputation: 152

if you found an appropriate answer, consider adding it as an answer rather than a comment. – Lorenzo Von Matterhorn – 2013-04-07T17:43:38.900

Answers

1

Adding this file to ~/Library/KeyBindings/DefaultKeyBinding.dict does the trick:

https://github.com/walter/additional-mac-os-x-emacs-key-bindings/blob/master/DefaultKeyBinding.dict

Justin Thomas

Posted 2013-04-07T16:36:29.903

Reputation: 152

0

In a C-shell, (tcsh, zsh, csh), a built-in command called bindkey will display all the bindings for various navigation and selection shortcuts. While the command does not exist in the other shells, at least several bindings work in /bin/bash and /bin/sh that I've tested.

If bindkeys gives you a "command not found" error, enter tcsh, and try again at the new prompt. You can redirect the output from bindkey to a file which you can reference later. Once you're finished with tcsh, type exit and you'll go back to your regular command line shell.

Many of the bindings listed also work in TextEdit.app, or on the URL bar of web browsers.

Note that ^ means Ctrl, and ^] means Esc. Not all of the key bindings are applicable in every application.

Nevin Williams

Posted 2013-04-07T16:36:29.903

Reputation: 3 725

-1

I don't know if it is what you want but you can still use the mac os shortcut using :

+ one word left

+ one word right

+ beginning of line

+ end of line

Michel

Posted 2013-04-07T16:36:29.903

Reputation: 169

1I wanted emacs key bindings. – Justin Thomas – 2013-04-08T20:58:47.080

⌘+← and ⌘+→ don't bring me to the beginning of the line, they cycle through Terminal windows. – Ben Companjen – 2014-03-02T20:50:45.820