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

Vi mode bindings are overwriting the search #5430

Closed
matheusfillipe opened this issue Aug 18, 2021 · 3 comments
Closed

Vi mode bindings are overwriting the search #5430

matheusfillipe opened this issue Aug 18, 2021 · 3 comments

Comments

@matheusfillipe
Copy link

If I start search forward or backward and type a vi mode bound key like h, j, k, l, v, a etc it won't do nothing, won't write the word neither search.To me it seems that the vi mode assigned bindings are masking over the search.

Peek 2021-08-18 03-46

As you can see only the m key displays.

key_bindings

key_bindings:
    # (Windows, Linux, and BSD only)
  - { key: V,         mods: Control|Shift, action: Paste                       }
  - { key: C,         mods: Control|Shift, action: Copy                        }
  - { key: Insert,    mods: Shift,         action: PasteSelection              }
  - { key: Key0,      mods: Control,       action: ResetFontSize               }
  - { key: Equals,    mods: Control,       action: IncreaseFontSize            }
  - { key: Plus,      mods: Control,       action: IncreaseFontSize            }
  - { key: Minus,     mods: Control,       action: DecreaseFontSize            }
  - { key: Minus,     mods: Control,       action: DecreaseFontSize            }
  - { key: F11,       mods: None,          action: ToggleFullscreen            }
  - { key: Paste,     mods: None,          action: Paste                       }
  - { key: Copy,      mods: None,          action: Copy                        }
  - { key: L,         mods: Control,       mode: ~Vi, action: ClearLogNotice              }
  - { key: L,         mods: Control,       mode: ~Vi, chars: "\x0c"                       }
  - { key: PageUp,    mods: None,          action: ScrollPageUp,   mode: ~Alt  }
  - { key: PageDown,  mods: None,          action: ScrollPageDown, mode: ~Alt  }
  - { key: Home,      mods: Shift,         action: ScrollToTop,    mode: ~Alt  }
  - { key: End,       mods: Shift,         action: ScrollToBottom, mode: ~Alt  }
  - { key: F,  mods: Control,            action: SearchBackward          }
 # Vi Mode
  - { key: Space,  mods: Control,       mode: Vi, action: ScrollToBottom          }
  - { key: Space,  mods: Control,                 action: ToggleViMode            }
  - { key: I,                           mode: Vi, action: ScrollToBottom          }
  - { key: I,                           mode: Vi, action: ToggleViMode            }
  - { key: A,                           mode: Vi, action: ScrollToBottom          }
  - { key: A,                           mode: Vi, action: ToggleViMode            }
  - { key: A,       mods: Shift,                    mode: Vi, action: ScrollToBottom          }
  - { key: A,       mods: Shift,                    mode: Vi, action: ToggleViMode            }

  - { key: P,         mode: Vi,              action: ScrollToBottom          }
  - { key: P,         mode: Vi,              action: Paste          }
  - { key: Paste,     mode: Vi,          action: Paste                       }

  - { key: C,      mods: Control,       mode: Vi, action: ScrollToBottom          }
  - { key: C,      mods: Control,       mode: Vi, action: ToggleViMode            }
  - { key: Escape,                      mode: Vi, action: ClearSelection          }
  - { key: Y,      mods: Control,       mode: Vi, action: ScrollLineUp            }
  - { key: E,      mods: Control,       mode: Vi, action: ScrollLineDown          }
  - { key: G,                           mode: Vi, action: ScrollToTop             }
  - { key: G,      mods: Shift,         mode: Vi, action: ScrollToBottom          }
  - { key: B,      mods: Control,       mode: Vi, action: ScrollPageUp            }
  - { key: F,      mods: Control,       mode: Vi, action: ScrollPageDown          }
  - { key: U,      mods: Control,       mode: Vi, action: ScrollHalfPageUp        }
  - { key: D,      mods: Control,       mode: Vi, action: ScrollHalfPageDown      }
  - { key: Y,                           mode: Vi, action: Copy                    }
  - { key: Y,                           mode: Vi, action: ClearSelection          }
  - { key: V,                           mode: Vi, action: ToggleNormalSelection   }
  - { key: V,      mods: Shift,         mode: Vi, action: ToggleLineSelection     }
  - { key: V,      mods: Control,       mode: Vi, action: ToggleBlockSelection    }
  - { key: V,      mods: Alt,           mode: Vi, action: ToggleSemanticSelection }
  - { key: Return,                      mode: Vi, action: Open                    }
  - { key: K,                           mode: Vi, action: Up                      }
  - { key: J,                           mode: Vi, action: Down                    }
  - { key: H,                           mode: Vi, action: Left                    }
  - { key: L,                           mode: Vi, action: Right                   }
  - { key: Up,                          mode: Vi, action: Up                      }
  - { key: Down,                        mode: Vi, action: Down                    }
  - { key: Left,                        mode: Vi, action: Left                    }
  - { key: Right,                       mode: Vi, action: Right                   }
  - { key: Key0,                        mode: Vi, action: First                   }
  - { key: 86, mods: Shift, mode: Vi, action: First }
  - { key: 5, mods: Shift, mode: Vi, action: Last }
  - { key: Key6,   mods: Shift,         mode: Vi, action: FirstOccupied           }
  - { key: H,      mods: Shift,         mode: Vi, action: High                    }
  - { key: M,      mods: Shift,         mode: Vi, action: Middle                  }
  - { key: L,      mods: Shift,         mode: Vi, action: Low                     }
  - { key: B,                           mode: Vi, action: SemanticLeft            }
  - { key: W,                           mode: Vi, action: SemanticRight           }
  - { key: E,                           mode: Vi, action: SemanticRightEnd        }
  - { key: B,      mods: Shift,         mode: Vi, action: WordLeft                }
  - { key: W,      mods: Shift,         mode: Vi, action: WordRight               }
  - { key: E,      mods: Shift,         mode: Vi, action: WordRightEnd            }
  - { key: Key5,   mods: Shift,         mode: Vi, action: Bracket                 }
  - { key: 89,                       mode: Vi, action: SearchForward           }
  - { key: 89,  mods: Shift,         mode: Vi, action: SearchBackward          }
  - { key: N,                           mode: Vi, action: SearchNext              }
  - { key: N,      mods: Shift,         mode: Vi, action: SearchPrevious          }
  - { key: L,         mods: Control, mode: Vi, action: ToggleNormalSelection                       }
  - { key: L,         mods: Control, mode: Vi, action:  Last            }


  - { key: Return,   mods: Control, action: SpawnNewInstance }
  - { key: Return,   mods: Shift,   chars: "\x1b[13;2u" }
  - { key: Return,   mods: Control, chars: "\x1b[13;5u" }

System

OS: Arch Linux x86_64, DE: KDE Plasma 5.20.2, CPU: Intel i7-7700HQ (8) @ 3.800GHz, GPU: NVIDIA GeForce GTX 1050 Ti Mobile, GPU: Intel HD Graphics 630, Memory: 15.5 GiB

alacritty 0.9.0 (fed349a)

@chrisduerr
Copy link
Member

Your bindings are at fault. If you don't want them active during a specific mode, you need to specify that.

@matheusfillipe
Copy link
Author

@chrisduerr So i have to add mode: Vi | ~Search, To every single Vi mode keybinding that doesn't modifiers besides Shift? Shouldn't that be pretty common that you want to be able to type all characters on the search mode?

@chrisduerr
Copy link
Member

The default bindings all have that configured already. If you want to bind everything again it's up to you to do it right.

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

No branches or pull requests

2 participants