Skip to content

Instantly share code, notes, and snippets.

@luochen1990
Forked from zedongh/.zshrc
Last active May 23, 2019 06:41
Show Gist options
  • Select an option

  • Save luochen1990/ff3d28a576b57edac62f6dab3778ffec to your computer and use it in GitHub Desktop.

Select an option

Save luochen1990/ff3d28a576b57edac62f6dab3778ffec to your computer and use it in GitHub Desktop.

Revisions

  1. luochen1990 revised this gist May 23, 2019. 1 changed file with 26 additions and 1 deletion.
    27 changes: 26 additions & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,9 @@
    [[ -e ~/.profile ]] && emulate sh -c 'source ~/.profile'
    [[ -e ~/.shrc ]] && emulate sh -c 'source ~/.shrc'
    source $HOME/.antigen.zsh

    # POWERLEVEL9K_INSTALLATION_PATH=$ANTIGEN_BUNDLES/bhilburn/powerlevel9k

    antigen use oh-my-zsh

    antigen bundles <<EOF
    @@ -13,16 +17,37 @@ antigen bundles <<EOF
    sbt
    gradle
    mvn
    git
    pip
    lein
    command-not-found
    heroku
    larkery/zsh-histdb
    zsh-users/zsh-syntax-highlighting
    zsh-users/zsh-autosuggestions
    zsh-users/zsh-completions
    EOF

    antigen theme bira
    #antigen theme bhilburn/powerlevel9k powerlevel9k

    antigen apply

    # Configs for [histdb](https://github.com/larkery/zsh-histdb)
    source ~/.antigen/bundles/larkery/zsh-histdb/sqlite-history.zsh
    autoload -Uz add-zsh-hook
    add-zsh-hook precmd histdb-update-outcome

    _zsh_autosuggest_strategy_histdb_top(){
    local query="select commands.argv from
    history left join commands on history.command_id = commands.rowid
    left join places on history.place_id = places.rowid
    where commands.argv LIKE '$(sql_escape $1)%'
    group by commands.argv
    order by places.dir != '$(sql_escape $PWD)', count(*) desc limit 1"
    suggestion=$(_histdb_query "$query")
    }

    ZSH_AUTOSUGGEST_STRATEGY=histdb_top

    source histdb-interactive.zsh
    bindkey '^r' _histdb-isearch
  2. luochen1990 revised this gist Apr 25, 2019. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    source $HOME/antigen.zsh
    source $HOME/.antigen.zsh

    antigen use oh-my-zsh

    2 changes: 1 addition & 1 deletion command
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    curl -L git.io/antigen > antigen.zsh
    curl -L git.io/antigen > .antigen.zsh


  3. @zedongh zedongh revised this gist Nov 29, 2018. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1 +0,0 @@
    curl -L git.io/antigen > antigen.zsh
  4. @zedongh zedongh revised this gist Nov 29, 2018. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions command
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    curl -L git.io/antigen > antigen.zsh


  5. @zedongh zedongh revised this gist Nov 29, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    curl -L git.io/antigen > antigen.zsh
  6. @zedongh zedongh created this gist Nov 29, 2018.
    28 changes: 28 additions & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    source $HOME/antigen.zsh

    antigen use oh-my-zsh

    antigen bundles <<EOF
    npm
    node
    docker
    cabal
    pyenv
    python
    scala
    sbt
    gradle
    mvn
    git
    pip
    lein
    command-not-found
    heroku
    zsh-users/zsh-syntax-highlighting
    zsh-users/zsh-autosuggestions
    zsh-users/zsh-completions
    EOF

    antigen theme bira

    antigen apply