peterh / liner

Pure Go line editor with history, inspired by linenoise
MIT License
1.04k stars 132 forks source link

Move cursor to previous word shortcut does not work as expected #70

Closed ikandaswamy closed 8 years ago

ikandaswamy commented 8 years ago

The Documentation says that in order to move to the prev/next word we need to press the Ctrl + < / Ctrl + > keys. For the mac it seems to be Ctrl + command + arrow key.

Is this expected ?

Thanks Ik.

peterh commented 8 years ago

By default, MacOS routes Ctrl ← and Ctrl → to "Mission Control: Move left a space" and "Move right a space".

You can disable this by going into System Preferences / Keyboard / Shortcuts / Mission Control and unchecking the Move left/right a space options. Then liner works as expected.

It appears that Apple's build of bash doesn't support Ctrl ← or Ctrl →, so maybe it's better to leave it alone and get used to pressing Alt ← and Alt → instead (for consistency) when you're on MacOS. But that's going to come down to personal preference.

ikandaswamy commented 8 years ago

Thanks!