gchp / iota

A terminal-based text editor written in Rust
MIT License
1.64k stars 81 forks source link

Goto Anything #134

Open jncraton opened 6 years ago

jncraton commented 6 years ago

Is there interest in a simplified Goto Anything feature? This would make it much simpler to navigate inside files for me.

I'm aware of the goto line number issue. This would supersede that feature. It could work as follows:

gchp commented 6 years ago

That sounds good to me!

gchp commented 6 years ago

Search is something I haven't even thought about yet, but if you have ideas I'd love to hear them.

jncraton commented 6 years ago

Sounds good. I'm a little unclear what the overall UI vision for this project is, so I wasn't sure the best way to handle this sort of thing. It feels like a mix of Emacs, Vim, and modern GUIs right now. On the Vim side of things, I think it make sense to implement these common Vim commands as a start:

On the default mode, Ctrl+g bound to a Goto Anything interface makes sense to me for now given the other keys that are already bound. Longer term, I think it makes sense to have a modern UI mode (Ctrl+f for find, Ctrl+d to duplicate a line, Ctrl+arrows for word movement, etc).

gchp commented 6 years ago

Yeah, I would be happy to rename the current default keybinding mode to somethink like "emacs" mode. Then create a new default mode as you describe. So we'd then have optional vi and emacs modes which you could choose via a command line option.