Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offer the previous string in Find / Replace command (Feature request) #1748

Open
HJarausch opened this issue Jun 28, 2020 · 3 comments
Open

Comments

@HJarausch
Copy link

When invoking the Find or Replace command the search string of the previous command should be offered.

@zyedidia
Copy link
Owner

I think it’s best to keep it how it is. You can access previous searches by using the up arrow in the find prompt, and pressing ctrl-n in the buffer will instantly find the next occurrence of the previous search.

@Makeshift
Copy link

In less, when opening up 'find' with / the search box remains empty, but if you press enter it will search for the previously entered search pattern again.

I think it would be nice to have the ability to do this in Micro. Most other editors have a variation of this - eg Sublime Text retains the find, but selects it so if you start typing it gets overwritten.

Ctrl-n definitely makes this pointless, but that also means having to remember the keybind! :D

@chapmanjacobd
Copy link

chapmanjacobd commented Nov 15, 2022

Yeah this is pretty confusing... but if it was possible to add keybindings which only work on the search prompt then people would have more flexibility to make the behavior feel natural to them.

For example, I would prefer that enter would bind to both confirm the search and jump to the next match and I would prefer that ctrl+n and ctrl+p would work in the search prompt. When I want to exit searching I press Esc... Obviously those commands don't make sense to have run in the default configuration wherein the search text has not been "confirmed" yet--and I don't expect this behavior to make sense to everyone, but it would be nice if micro allowed for more flexibility

#2350
#2515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants