Replies: 1 comment 1 reply
You can actually define keymaps that would otherwise cause lots of conflicts by using this pattern: glide.keymaps.set("insert", "<CR>", async () => {
if (glide.findbar.is_focused()) {
await glide.findbar.close(); // kind of a hack to just move focus out of the findbar
} else {
await glide.keys.send("<CR>", { skip_mappings: true });
}
});this means that the glide.keymaps.set("normal", "\\", async () => {
await glide.findbar.open();
});
glide.keymaps.set("normal", "n", async () => {
await glide.findbar.next_match();
});
glide.keymaps.set("normal", "N", async () => {
await glide.findbar.previous_match();
});
glide.keymaps.set("insert", "<CR>", async () => {
if (glide.findbar.is_focused()) {
await glide.findbar.close(); // kind of a hack to just move focus out of the findbar
} else {
await glide.keys.send("<CR>", { skip_mappings: true });
}
});note that |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'd like to be able to do
\- open findbarn/Nto go through matchesThe only missing piece is binding
<CR>to unfocusing the searchbar. I don't think I should make a global map for<CR>as that could interfere with a lot of things. What can I do?All reactions