Open Funami580 opened 2 years ago
Can you share a bit more about the workflow in which you want it to be explicitly blank? That might inform how to deal with this!
I don’t think I have a specific workflow. I use the search action to search for specific words in the terminal, that are most of the times different (especially when large text chunks are printed to the terminal). When a pattern is predefined or the old pattern is used, I always have to delete it first, to enter the new pattern. And that takes time, as deleting the pattern requires pressing backspace for some time, in particular if the last search term was really long. Perhaps some way to clear the entire current search term really fast with one shortcut would be an alternative?
Thanks! In the mean time, you can use CTRL-u to clear the pattern.
I have a local development branch which restructures the scrollback data structures and dramatically improves search performance; there are still some kinks to work out before I can merge that code.
I have a similar workflow where I always want to start searching from an empty pattern. To clear on a new search, I currently use:
{
key = "/",
mods = "NONE",
action = act.Multiple({
act.CopyMode("ClearPattern"),
act.Search({ CaseSensitiveString = "" }),
}),
},
However I cannot seem to clear the pattern when I am entering CopyMode
for some reason. Using similar strategy:
{
key = "phys:Space",
mods = "SHIFT|CTRL",
action = act.Multiple({
act.ActivateCopyMode,
act.CopyMode("ClearPattern"),
}),
},
Here I cannot clear the search pattern after entering CopyMode
act.CopyMode does not work after ActivateCopyMode with act.Multiple
act.Multiple {
act.ActivateCopyMode,
-- ↓ does not work
act.CopyMode "MoveToViewportTop",
act.CopyMode "MoveLeft",
act.CopyMode "MoveRight",
}
version: 20230408-112425-69ae8472
+1 I would also appreciate a config option to set search empty on each new search.
any updates/solutions on this one?
I'd like this option as well
as a new wezterm user, the reason i switch back to iterm is the search. any time I open a search interstitial i expect it to be blank to start
@maceip if you want to stick with wezterm you can use ctrl-u to clear the search bar as a workaround.
Is your feature request related to a problem? Please describe. In https://github.com/wez/wezterm/commit/dc0fde7ae001b5210d2cd4752c71429af08d8ac4 the behaviour of the search was altered and it now defaults to using the last search term, if the pattern is empty. I’ve been using the empty pattern as default, though.
Describe the solution you'd like I’m not sure, what’s the best way to handle this. Possible would be
or
for signalising the active use of the last search term. But there may also be better solutions to this.
Describe alternatives you've considered Not sure if there is an alternative?