zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.94k stars 1.17k forks source link

Lightweight fuzzy file and buffer search #477

Closed vext01 closed 7 years ago

vext01 commented 7 years ago

Hi zyedidia,

I don't know if you have used vim with plugins like ctrl+p or fzf? They let you fuzzy search for files on the filesystem and open buffers. Really useful for working on multi-file source code.

Do you think this feature would be nice for micro?

(You may be able to lift the fuzzy match from fzf, which is also written in go)

Thanks

zyedidia commented 7 years ago

There is in fact a plugin for micro that lets you use fzf to open files. You can install it with > plugin install fzf. See here for the project page.

You can bind a key to fzf as well using this plugin, for example:

{
    "CtrlO": "fzf.fzf"
}
vext01 commented 7 years ago

Ah, very nice.

Am I right that we don't get the buffer search ability, since micro has no such notion, right?

P.S.

I just submitted a port of micro to OpenBSD. With any luck I can import it soon :)

zyedidia commented 7 years ago

Micro does have the notion of buffers, although you can't have a hidden buffer the way you can in vim.

vext01 commented 7 years ago

I see. I think the ability to fuzzy search recently opened files would be useful, even if you are not holding the files open in the background.

zyedidia commented 7 years ago

I'm going to close this because I think this functionality is covered adequately by the fzf plugin.