Skip to content
This repository has been archived by the owner. It is now read-only.
Make ido completes like built-in M-x does, useful when use smex or use ido to complete other hyphen separated choises
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
ido-complete-space-or-hyphen.el

README.md

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

Get started

  • Get ido-complete-space-or-hyphen

  • Add following lines to your .emacs file:

    (require 'ido-complete-space-or-hyphen)
    (ido-mode t)
    

Then try examples below, or use it with smex.

Example

(ido-completing-read "test: " '("ido-foo-bar" "ido-space" "ido-test"))

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

(ido-completing-read "test: " '("ido foo-bar" "ido space" "ido test"))

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

(ido-completing-read "test: " '("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.

(ido-completing-read "test: " '("ido-foo-bar" "ido-space" "ido test"))

| Key Sequence | Result                           |
|--------------+----------------------------------+
| i            | "i"                              |
| SPACE        | "ido"                            |
| SPACE        | "ido"  Completion popup is shown |
| SPACE        | "ido "                           |

If both HYPHEN and SPACE can be inserted, SPACE first brings the completion popup window, if user types SPACE again, then SPACE itself is inserted.

You can’t perform that action at this time.