Git Product home page Git Product logo

Comments (8)

sunaku avatar sunaku commented on May 20, 2024 3

@desyncr Thanks for clarifying. 👍 Antigen users should just configure their keybindings (as described in step 2 of the "Usage" section in the README) after activating this plugin; it's only 2 extra lines of code. 😱

antigen bundle zsh-users/zsh-history-substring-search
# configure your keybindings here... just 2 lines of code!
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down

These keybindings aren't performed automagically (as the OP requests) when you load this plugin because:

  • The user should have full control over how they want to use this plugin (and through which keys). 🖐️
  • We haven't found a universal way of specifying keycodes for the up and down arrow keys, which is why step 2 of the "Usage" section in the README has several ways of binding them: $terminfo[kcuu1] vs $terminfo[cuu1] vs ^[[A so there is no "one ring to rule them all" 💍 way that Just Works.

from zsh-history-substring-search.

sunaku avatar sunaku commented on May 20, 2024 3

@aramboi Thanks for confirming. 👍 Here's a final example for Antigen users:

antigen bundle zsh-users/zsh-history-substring-search
antigen apply

# zsh-history-substring-search configuration
# (put whatever configuration you want here!)
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1
# and more... see the README for information

Case closed. 📕

from zsh-history-substring-search.

Tarrasch avatar Tarrasch commented on May 20, 2024

@marco-lavagnino, what is missing do you think? Can you be more concrete? Is it correct the only thing you need is the keybindings?

from zsh-history-substring-search.

unixorn avatar unixorn commented on May 20, 2024

@Tarrasch This may be related to the removal of the .plugin.zsh file as discussed in #48 and https://github.com/zsh-users/zsh-history-substring-search/pull/49/files.

@marco-lavagnino's description sounds like Antigen is looking specifically for a plugin.zsh file and not checking for *.zsh

from zsh-history-substring-search.

desyncr avatar desyncr commented on May 20, 2024

@Tarrasch @marco-lavagnino may correct me but yes, the issue is with keybindings.

@unixorn Antigen has no issues with or without plugin.zsh, it will look for *.zsh and load it.

from zsh-history-substring-search.

aramboi avatar aramboi commented on May 20, 2024

The bindkey lines above should be added after antigen apply in order to work.
Thanks for explaining this issue in detail @sunaku.

from zsh-history-substring-search.

kapad avatar kapad commented on May 20, 2024
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down

Which keyboard key combinations will this map to?

from zsh-history-substring-search.

guidovansteen avatar guidovansteen commented on May 20, 2024

Which keyboard key combinations will this map to?

arrow up and arrow down.

from zsh-history-substring-search.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.