Add package ido-complete-space-or-hyphen

Make ido completes like built-in M-x does, useful when use smex or use ido to
complete other hyphen separated choices

Example
-------

Choices: "ido-foo-bar", "ido-space" "ido-test"

    | Key Sequence | Result |
    |--------------+--------|
    | i            | "i"    |
    | SPACE        | "ido-" |

Choices: "ido-foo-bar", "ido-space" "ido-test"

    | Key Sequence | Result |
    |--------------+--------|
    | i            | "i"    |
    | SPACE        | "ido " |

Choices: "ido-foo-bar", "ido-space" "idotest"

    | Key Sequence | Result |
    |--------------+--------|
    | i            | "i"    |
    | SPACE        | "ido"  |
    | SPACE        | "ido-" |

When HYPHEN can be inserted and SPACE cannot, insert HYPHEN when user enter SPACE.

Choices: "ido-foo-bar", "ido-space" "ido test"

    | Key Sequence | Result |
    |--------------+--------|
    | i            | "i"    |
    | SPACE        | "ido"  |
    | SPACE        | "ido " |

If bot HYPHEN and SPACE can be inserted, SPACE just inserts itself.
This commit is contained in:
Ian Yang 2013-02-27 07:41:32 +08:00
parent 902eab0b2d
commit 6e32d9a615

View file

@ -0,0 +1 @@
(ido-complete-space-or-hyphen :repo "doitian/ido-complete-space-or-hyphen" :fetcher github)