Is there something similar to the CommandT plugin in vim for emacs? I know some plugins that do directory-based completion, but is there one that does matching on the full paths?
An example:
├── bar
│ └── hello
├── baz
│ └── test
│ └── hello
└── foo
├── hello
└── lost
baz
baz/test
baz/test/hello
bar
bar/hello
foo
foo/hello
foo/lost
Now when I type 'h', I'd like the paths
baz/test/hello
bar/hello
foo/hello
to match. For 't', there should be
baz/test/hello
foo/lost
M- means "meta key", (“Escape” in the lab, on other computers sometimes “Alt”). For meta commands with the Escape key, press the Escape key and then release it, then press the other key. Thus M-f stands for the keyboard sequence "press and release the Escape key", " press f".
You can run any Emacs command by name using M-x , whether or not any keys are bound to it. If you use M-x to run a command which also has a key binding, it displays a message to tell you about the key binding, before running the command.
Emacs uses the C- prefix to denote holding down Ctrl while pressing another key. For example, holding down Ctrl and pressing x is denoted as Ctrl-x in the rest of the Knowledge Base, but as C-x in Knowledge Base documents about Emacs.
ido does this AFAIK, and also anything.el.
Also, this emacswiki page has a list packages which do something similar.
Edit: According to Drew's comment Ido does not match the whole path. Anything on the other hand does, as it can be seen on the screenshot behind the link.
Icicles does matching on full paths (i.e., any and all parts of an absolute file name). See Icicles File-Name Input.
By default, in Icicle mode C-x C-f is bound to icicle-file
:
without a prefix arg -- uses the usual Emacs relative file-name completion
with a prefix arg (e.g. C-u C-x C-f) -- does absolute file-name completion
Command icicle-find-file-absolute
is the same as C-u C-x C-f. You can bind it if you don't want to use the key sequence C-u C-x C-f each time.
During completion of either type (relative/absolute file names), you can use any of the Icicles completion features, such as:
And file-name completion commands such as these are multi-commands, which means you can act on multiple files with the same command. See also command icicle-locate
, which does absolute file-name matching and lets you find and act on files anywhere on your file system, without knowing their locations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With