about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--.zpreztorc239
-rw-r--r--.zshrc65
-rw-r--r--fzf-git/forgit.plugin.zsh228
-rw-r--r--fzf-git/functions.sh52
-rw-r--r--fzf-git/key-binding.zsh17
-rw-r--r--init.vim170
-rw-r--r--starship.toml38
7 files changed, 809 insertions, 0 deletions
diff --git a/.zpreztorc b/.zpreztorc
new file mode 100644
index 0000000..dde74dd
--- /dev/null
+++ b/.zpreztorc
@@ -0,0 +1,239 @@
+#
+# Sets Prezto options.
+#
+# Authors:
+#   Sorin Ionescu <sorin.ionescu@gmail.com>
+#
+
+#
+# General
+#
+
+# Set case-sensitivity for completion, history lookup, etc.
+# zstyle ':prezto:*:*' case-sensitive 'yes'
+
+# Color output (auto set to 'no' on dumb terminals).
+zstyle ':prezto:*:*' color 'yes'
+
+# Add additional directories to load prezto modules from
+# zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto-contrib
+
+# Allow module overrides when pmodule-dirs causes module name collisions
+# zstyle ':prezto:load' pmodule-allow-overrides 'yes'
+
+# Set the Zsh modules to load (man zshmodules).
+# zstyle ':prezto:load' zmodule 'attr' 'stat'
+
+# Set the Zsh functions to load (man zshcontrib).
+# zstyle ':prezto:load' zfunction 'zargs' 'zmv'
+
+# Set the Prezto modules to load (browse modules).
+# The order matters.
+zstyle ':prezto:load' pmodule \
+  'environment' \
+  'terminal' \
+  'editor' \
+  'history' \
+  'directory' \
+  'spectrum' \
+  'utility' \
+  'completion' \
+  'fasd' \
+  'gpg' \
+  'git' \
+  'omz-git' \
+  'ssh' \
+  'syntax-highlighting' \
+  'history-substring-search' \
+  'autosuggestions' \
+  'prompt'
+
+#
+# Autosuggestions
+#
+
+# Set the query found color.
+# zstyle ':prezto:module:autosuggestions:color' found ''
+
+#
+# Completions
+#
+
+# Set the entries to ignore in static */etc/hosts* for host completion.
+# zstyle ':prezto:module:completion:*:hosts' etc-host-ignores \
+#   '0.0.0.0' '127.0.0.1'
+
+#
+# Editor
+#
+
+# Set the key mapping style to 'emacs' or 'vi'.
+zstyle ':prezto:module:editor' key-bindings 'vi'
+
+# Auto convert .... to ../..
+# zstyle ':prezto:module:editor' dot-expansion 'yes'
+
+# Allow the zsh prompt context to be shown.
+#zstyle ':prezto:module:editor' ps-context 'yes'
+
+#
+# Git
+#
+
+# Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'.
+# zstyle ':prezto:module:git:status:ignore' submodules 'all'
+
+#
+# GNU Utility
+#
+
+# Set the command prefix on non-GNU systems.
+#zstyle ':prezto:module:gnu-utility' prefix 'g'
+
+#
+# History Substring Search
+#
+
+# Set the query found color.
+# zstyle ':prezto:module:history-substring-search:color' found ''
+
+# Set the query not found color.
+# zstyle ':prezto:module:history-substring-search:color' not-found ''
+
+# Set the search globbing flags.
+zstyle ':prezto:module:history-substring-search' globbing-flags ''
+
+#
+# macOS
+#
+
+# Set the keyword used by `mand` to open man pages in Dash.app
+# zstyle ':prezto:module:osx:man' dash-keyword 'manpages'
+
+#
+# Pacman
+#
+
+# Set the Pacman frontend.
+# zstyle ':prezto:module:pacman' frontend 'yaourt'
+
+#
+# Prompt
+#
+
+# Set the prompt theme to load.
+# Setting it to 'random' loads a random theme.
+# Auto set to 'off' on dumb terminals.
+#zstyle ':prezto:module:prompt' theme 'powerlevel10k'
+zstyle ':prezto:module:prompt' theme 'djm'
+#zstyle ':prezto:module:prompt' theme 'gnzh'
+#zstyle ':prezto:module:prompt' theme 'imp'
+
+# Set the working directory prompt display length.
+# By default, it is set to 'short'. Set it to 'long' (without '~' expansion)
+# for longer or 'full' (with '~' expansion) for even longer prompt display.
+# zstyle ':prezto:module:prompt' pwd-length 'short'
+
+# Set the prompt to display the return code along with an indicator for non-zero
+# return codes. This is not supported by all prompts.
+# zstyle ':prezto:module:prompt' show-return-val 'yes'
+
+#
+# Python
+#
+
+# Auto switch the Python virtualenv on directory change.
+# zstyle ':prezto:module:python:virtualenv' auto-switch 'yes'
+
+# Automatically initialize virtualenvwrapper if pre-requisites are met.
+# zstyle ':prezto:module:python:virtualenv' initialize 'yes'
+
+#
+# Ruby
+#
+
+# Auto switch the Ruby version on directory change.
+# zstyle ':prezto:module:ruby:chruby' auto-switch 'yes'
+
+#
+# Screen
+#
+
+# Auto start a session when Zsh is launched in a local terminal.
+# zstyle ':prezto:module:screen:auto-start' local 'yes'
+
+# Auto start a session when Zsh is launched in a SSH connection.
+# zstyle ':prezto:module:screen:auto-start' remote 'yes'
+
+#
+# SSH
+#
+
+# Set the SSH identities to load into the agent.
+#zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_rsa2' 'id_github'
+zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_ed25519'
+
+#
+# Syntax Highlighting
+#
+
+# Set syntax highlighters.
+# By default, only the main highlighter is enabled.
+zstyle ':prezto:module:syntax-highlighting' highlighters \
+  'main' \
+  'brackets' \
+  'pattern' \
+  'line' \
+  'cursor' \
+  'root'
+#
+# Set syntax highlighting styles.
+# zstyle ':prezto:module:syntax-highlighting' styles \
+#   'builtin' 'bg=blue' \
+#   'command' 'bg=blue' \
+#   'function' 'bg=blue'
+#
+# Set syntax pattern styles.
+# zstyle ':prezto:module:syntax-highlighting' pattern \
+#   'rm*-rf*' 'fg=white,bold,bg=red'
+
+#
+# Terminal
+#
+
+# Auto set the tab and window titles.
+# zstyle ':prezto:module:terminal' auto-title 'yes'
+
+# Set the window title format.
+# zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s'
+
+# Set the tab title format.
+# zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
+
+# Set the terminal multiplexer title format.
+# zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
+
+#
+# Tmux
+#
+
+# Auto start a session when Zsh is launched in a local terminal.
+# zstyle ':prezto:module:tmux:auto-start' local 'yes'
+
+# Auto start a session when Zsh is launched in a SSH connection.
+# zstyle ':prezto:module:tmux:auto-start' remote 'yes'
+
+# Integrate with iTerm2.
+# zstyle ':prezto:module:tmux:iterm' integrate 'yes'
+
+# Set the default session name:
+# zstyle ':prezto:module:tmux:session' name 'YOUR DEFAULT SESSION NAME'
+
+#
+# Utility
+#
+
+# Enabled safe options. This aliases cp, ln, mv and rm so that they prompt
+# before deleting or overwriting files. Set to 'no' to disable this safer
+# behavior.
+# zstyle ':prezto:module:utility' safe-ops 'yes'
diff --git a/.zshrc b/.zshrc
new file mode 100644
index 0000000..cd6e682
--- /dev/null
+++ b/.zshrc
@@ -0,0 +1,65 @@
+#
+# Executes commands at the start of an interactive session.
+#
+# Authors:
+#   Sorin Ionescu <sorin.ionescu@gmail.com>
+#
+
+# Source Prezto.
+if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
+  source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
+fi
+
+# Customize to your needs...
+#export TERM=xterm-256color
+export EDITOR=vim
+
+export GOPATH=~/go
+export PATH=$GOPATH/bin:"${PATH}"
+
+[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
+export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow -g "!{.git,node_modules}/*" 2> /dev/null'
+export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
+#bind -x '"\C-p": vim $(fzf -m);'
+#export FZF_ALT_C_COMMAND="cd ~/; bfs -type d -nohidden | sed s/^\./~/"
+export FZF_ALT_C_COMMAND="rg --hidden --files --sort-files --null | xargs -0 dirname | sort -u"
+source ~/fzf-git/functions.sh
+source ~/fzf-git/key-binding.zsh
+source ~/fzf-git/forgit.plugin.zsh
+
+alias cp="cp -iv"
+alias mv="mv -iv"
+alias mkdir="mkdir -v"
+alias vi="vim"
+alias pp='pushbullet push "Pixel" link "${1}" "${1}"'
+alias please='sudo !!'
+
+alias f='fasd -f'
+alias v='f -e vim'
+
+# non-prezto theme
+#promptinit
+#prompt imp
+#prompt gnzh
+#source liquidprompt/liquidprompt
+
+#prompt djm
+#prompt sorin
+export PATH=$HOME/.cargo/bin:$PATH
+eval "$(starship init zsh)"
+
+function google() {
+    w3m 'https://www.google.co.uk/search?q='"${@}"
+}
+
+function crep() {
+    pattern=$1
+    shift
+    gawk '/'$1'/{c++} ENDFILE{if (c) print FILENAME":"c; c=0}' "${@}"
+}
+
+eval "$(direnv hook zsh)"
+export SDKMAN_DIR="/home/djm/.sdkman"
+[[ -s "/home/djm/.sdkman/bin/sdkman-init.sh" ]] && source "/home/djm/.sdkman/bin/sdkman-init.sh"
+#fpath=(~/.zsh.d/ $fpath)
+(( $+commands[doctl] )) && source <(doctl completion zsh)
diff --git a/fzf-git/forgit.plugin.zsh b/fzf-git/forgit.plugin.zsh
new file mode 100644
index 0000000..a9c0f20
--- /dev/null
+++ b/fzf-git/forgit.plugin.zsh
@@ -0,0 +1,228 @@
+# MIT (c) Wenxuan Zhang
+forgit::warn() { printf "%b[Warn]%b %s\n" '\e[0;33m' '\e[0m' "$@" >&2; }
+forgit::info() { printf "%b[Info]%b %s\n" '\e[0;32m' '\e[0m' "$@" >&2; }
+forgit::inside_work_tree() { git rev-parse --is-inside-work-tree >/dev/null; }
+
+# https://github.com/wfxr/emoji-cli
+hash emojify &>/dev/null && forgit_emojify='|emojify'
+
+forgit_pager=$(git config core.pager || echo 'cat')
+
+# git commit viewer
+forgit::log() {
+    forgit::inside_work_tree || return 1
+    local cmd opts graph files
+    files=$(sed -nE 's/.* -- (.*)/\1/p' <<< "$*") # extract files parameters for `git show` command
+    cmd="echo {} |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git show --color=always % -- $files | $forgit_pager"
+    opts="
+        $FORGIT_FZF_DEFAULT_OPTS
+        +s +m --tiebreak=index
+        --bind=\"enter:execute($cmd | LESS='-R' less)\"
+        --bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '\n' |${FORGIT_COPY_CMD:-pbcopy})\"
+        $FORGIT_LOG_FZF_OPTS
+    "
+    graph=--graph
+    [[ $FORGIT_LOG_GRAPH_ENABLE == false ]] && graph=
+    eval "git log $graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' $* $forgit_emojify" |
+        FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd"
+}
+
+# git diff viewer
+forgit::diff() {
+    forgit::inside_work_tree || return 1
+    local cmd files opts commit repo
+    [[ $# -ne 0 ]] && {
+        if git rev-parse "$1" -- &>/dev/null ; then
+            commit="$1" && files=("${@:2}")
+        else
+            files=("$@")
+        fi
+    }
+
+    repo="$(git rev-parse --show-toplevel)"
+    cmd="echo {} |sed 's/.*]  //' |xargs -I% git diff --color=always $commit -- '$repo/%' |$forgit_pager"
+    opts="
+        $FORGIT_FZF_DEFAULT_OPTS
+        +m -0 --bind=\"enter:execute($cmd |LESS='-R' less)\"
+        $FORGIT_DIFF_FZF_OPTS
+    "
+    eval "git diff --name-status $commit -- ${files[*]} | sed -E 's/^(.)[[:space:]]+(.*)$/[\1]  \2/'" |
+        FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd"
+}
+
+# git add selector
+forgit::add() {
+    forgit::inside_work_tree || return 1
+    # Add files if passed as arguments
+    [[ $# -ne 0 ]] && git add "$@" && return
+
+    local changed unmerged untracked files opts preview extract
+    changed=$(git config --get-color color.status.changed red)
+    unmerged=$(git config --get-color color.status.unmerged red)
+    untracked=$(git config --get-color color.status.untracked red)
+
+    # NOTE: paths listed by 'git status -su' mixed with quoted and unquoted style
+    # remove indicators | remove original path for rename case | remove surrounding quotes
+    extract="
+        sed 's/^.*]  //' |
+        sed 's/.* -> //' |
+        sed -e 's/^\\\"//' -e 's/\\\"\$//'"
+    preview="
+        file=\$(echo {} | $extract)
+        if (git status -s -- \$file | grep '^??') &>/dev/null; then  # diff with /dev/null for untracked files
+            git diff --color=always --no-index -- /dev/null \$file | $forgit_pager | sed '2 s/added:/untracked:/'
+        else
+            git diff --color=always -- \$file | $forgit_pager
+        fi"
+    opts="
+        $FORGIT_FZF_DEFAULT_OPTS
+        -0 -m --nth 2..,..
+        $FORGIT_ADD_FZF_OPTS
+    "
+    files=$(git -c color.status=always -c status.relativePaths=true status -su |
+        grep -F -e "$changed" -e "$unmerged" -e "$untracked" |
+        sed -E 's/^(..[^[:space:]]*)[[:space:]]+(.*)$/[\1]  \2/' |
+        FZF_DEFAULT_OPTS="$opts" fzf --preview="$preview" |
+        sh -c "$extract")
+    [[ -n "$files" ]] && echo "$files"| tr '\n' '\0' |xargs -0 -I% git add % && git status -su && return
+    echo 'Nothing to add.'
+}
+
+# git reset HEAD (unstage) selector
+forgit::reset::head() {
+    forgit::inside_work_tree || return 1
+    local cmd files opts
+    cmd="git diff --cached --color=always -- {} | $forgit_pager "
+    opts="
+        $FORGIT_FZF_DEFAULT_OPTS
+        -m -0
+        $FORGIT_RESET_HEAD_FZF_OPTS
+    "
+    files="$(git diff --cached --name-only --relative | FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd")"
+    [[ -n "$files" ]] && echo "$files" | tr '\n' '\0' | xargs -0 -I% git reset -q HEAD % && git status --short && return
+    echo 'Nothing to unstage.'
+}
+
+# git checkout-restore selector
+forgit::restore() {
+    forgit::inside_work_tree || return 1
+    local cmd files opts
+    cmd="git diff --color=always -- {} | $forgit_pager"
+    opts="
+        $FORGIT_FZF_DEFAULT_OPTS
+        -m -0
+        $FORGIT_CHECKOUT_FZF_OPTS
+    "
+    files="$(git ls-files --modified "$(git rev-parse --show-toplevel)"| FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd")"
+    [[ -n "$files" ]] && echo "$files" | tr '\n' '\0' | xargs -0 -I% git checkout % && git status --short && return
+    echo 'Nothing to restore.'
+}
+
+# git stash viewer
+forgit::stash::show() {
+    forgit::inside_work_tree || return 1
+    local cmd opts
+    cmd="echo {} |cut -d: -f1 |xargs -I% git stash show --color=always --ext-diff % |$forgit_pager"
+    opts="
+        $FORGIT_FZF_DEFAULT_OPTS
+        +s +m -0 --tiebreak=index --bind=\"enter:execute($cmd | LESS='-R' less)\"
+        $FORGIT_STASH_FZF_OPTS
+    "
+    git stash list | FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd"
+}
+
+# git clean selector
+forgit::clean() {
+    forgit::inside_work_tree || return 1
+    local files opts
+    opts="
+        $FORGIT_FZF_DEFAULT_OPTS
+        -m -0
+        $FORGIT_CLEAN_FZF_OPTS
+    "
+    # Note: Postfix '/' in directory path should be removed. Otherwise the directory itself will not be removed.
+    files=$(git clean -xdfn "$@"| sed 's/^Would remove //' | FZF_DEFAULT_OPTS="$opts" fzf |sed 's#/$##')
+    [[ -n "$files" ]] && echo "$files" | tr '\n' '\0' | xargs -0 -I% git clean -xdf '%' && return
+    echo 'Nothing to clean.'
+}
+
+# git ignore generator
+export FORGIT_GI_REPO_REMOTE=${FORGIT_GI_REPO_REMOTE:-https://github.com/dvcs/gitignore}
+export FORGIT_GI_REPO_LOCAL=${FORGIT_GI_REPO_LOCAL:-~/.forgit/gi/repos/dvcs/gitignore}
+export FORGIT_GI_TEMPLATES=${FORGIT_GI_TEMPLATES:-$FORGIT_GI_REPO_LOCAL/templates}
+
+forgit::ignore() {
+    [ -d "$FORGIT_GI_REPO_LOCAL" ] || forgit::ignore::update
+    local IFS cmd args cat opts
+    # https://github.com/sharkdp/bat.git
+    hash bat &>/dev/null && cat='bat -l gitignore --color=always' || cat="cat"
+    cmd="$cat $FORGIT_GI_TEMPLATES/{2}{,.gitignore} 2>/dev/null"
+    opts="
+        $FORGIT_FZF_DEFAULT_OPTS
+        -m --preview-window='right:70%'
+        $FORGIT_IGNORE_FZF_OPTS
+    "
+    # shellcheck disable=SC2206,2207
+    IFS=$'\n' args=($@) && [[ $# -eq 0 ]] && args=($(forgit::ignore::list | nl -nrn -w4 -s'  ' |
+        FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd" |awk '{print $2}'))
+    [ ${#args[@]} -eq 0 ] && return 1
+    # shellcheck disable=SC2068
+    if hash bat &>/dev/null; then
+        forgit::ignore::get ${args[@]} | bat -l gitignore
+    else
+        forgit::ignore::get ${args[@]}
+    fi
+}
+forgit::ignore::update() {
+    if [[ -d "$FORGIT_GI_REPO_LOCAL" ]]; then
+        forgit::info 'Updating gitignore repo...'
+        (cd "$FORGIT_GI_REPO_LOCAL" && git pull --no-rebase --ff) || return 1
+    else
+        forgit::info 'Initializing gitignore repo...'
+        git clone --depth=1 "$FORGIT_GI_REPO_REMOTE" "$FORGIT_GI_REPO_LOCAL"
+    fi
+}
+forgit::ignore::get() {
+    local item filename header
+    for item in "$@"; do
+        if filename=$(find -L "$FORGIT_GI_TEMPLATES" -type f \( -iname "${item}.gitignore" -o -iname "${item}" \) -print -quit); then
+            [[ -z "$filename" ]] && forgit::warn "No gitignore template found for '$item'." && continue
+            header="${filename##*/}" && header="${header%.gitignore}"
+            echo "### $header" && cat "$filename" && echo
+        fi
+    done
+}
+forgit::ignore::list() {
+    find "$FORGIT_GI_TEMPLATES" -print |sed -e 's#.gitignore$##' -e 's#.*/##' | sort -fu
+}
+forgit::ignore::clean() {
+    setopt localoptions rmstarsilent
+    [[ -d "$FORGIT_GI_REPO_LOCAL" ]] && rm -rf "$FORGIT_GI_REPO_LOCAL"
+}
+
+FORGIT_FZF_DEFAULT_OPTS="
+$FZF_DEFAULT_OPTS
+--ansi
+--height='80%'
+--bind='alt-k:preview-up,alt-p:preview-up'
+--bind='alt-j:preview-down,alt-n:preview-down'
+--bind='ctrl-r:toggle-all'
+--bind='ctrl-s:toggle-sort'
+--bind='?:toggle-preview'
+--bind='alt-w:toggle-preview-wrap'
+--preview-window='right:60%'
+$FORGIT_FZF_DEFAULT_OPTS
+"
+
+# register aliases
+# shellcheck disable=SC2139
+if [[ -z "$FORGIT_NO_ALIASES" ]]; then
+    alias "${forgit_add:-ga}"='forgit::add'
+    alias "${forgit_reset_head:-grh}"='forgit::reset::head'
+    alias "${forgit_log:-glo}"='forgit::log'
+    alias "${forgit_diff:-gd}"='forgit::diff'
+    alias "${forgit_ignore:-gi}"='forgit::ignore'
+    alias "${forgit_restore:-gcf}"='forgit::restore'
+    alias "${forgit_clean:-gclean}"='forgit::clean'
+    alias "${forgit_stash_show:-gss}"='forgit::stash::show'
+fi
diff --git a/fzf-git/functions.sh b/fzf-git/functions.sh
new file mode 100644
index 0000000..c1f6fb7
--- /dev/null
+++ b/fzf-git/functions.sh
@@ -0,0 +1,52 @@
+# GIT heart FZF
+# -------------
+
+is_in_git_repo() {
+  git rev-parse HEAD > /dev/null 2>&1
+}
+
+fzf-down() {
+  fzf --height 50% "$@" --border
+}
+
+_gf() {
+  is_in_git_repo || return
+  git -c color.status=always status --short |
+  fzf-down -m --ansi --nth 2..,.. \
+    --preview '(git diff --color=always -- {-1} | sed 1,4d; cat {-1}) | head -500' |
+  cut -c4- | sed 's/.* -> //'
+}
+
+_gb() {
+  is_in_git_repo || return
+  git branch -a --color=always | grep -v '/HEAD\s' | sort |
+  fzf-down --ansi --multi --tac --preview-window right:70% \
+    --preview 'git log --oneline --graph --date=short --color=always --pretty="format:%C(auto)%cd %h%d %s" $(sed s/^..// <<< {} | cut -d" " -f1) | head -'$LINES |
+  sed 's/^..//' | cut -d' ' -f1 |
+  sed 's#^remotes/##'
+}
+
+_gt() {
+  is_in_git_repo || return
+  git tag --sort -version:refname |
+  fzf-down --multi --preview-window right:70% \
+    --preview 'git show --color=always {} | head -'$LINES
+}
+
+_gh() {
+  is_in_git_repo || return
+  git log --date=short --format="%C(green)%C(bold)%cd %C(auto)%h%d %s (%an)" --graph --color=always |
+  fzf-down --ansi --no-sort --reverse --multi --bind 'ctrl-s:toggle-sort' \
+    --header 'Press CTRL-S to toggle sort' \
+    --preview 'grep -o "[a-f0-9]\{7,\}" <<< {} | xargs git show --color=always | head -'$LINES |
+  grep -o "[a-f0-9]\{7,\}"
+}
+
+_gr() {
+  is_in_git_repo || return
+  git remote -v | awk '{print $1 "\t" $2}' | uniq |
+  fzf-down --tac \
+    --preview 'git log --oneline --graph --date=short --pretty="format:%C(auto)%cd %h%d %s" {1} | head -200' |
+  cut -d$'\t' -f1
+}
+
diff --git a/fzf-git/key-binding.zsh b/fzf-git/key-binding.zsh
new file mode 100644
index 0000000..b2d00c5
--- /dev/null
+++ b/fzf-git/key-binding.zsh
@@ -0,0 +1,17 @@
+join-lines() {
+  local item
+  while read item; do
+    echo -n "${(q)item} "
+  done
+}
+
+bind-git-helper() {
+  local c
+  for c in $@; do
+    eval "fzf-g$c-widget() { local result=\$(_g$c | join-lines); zle reset-prompt; LBUFFER+=\$result }"
+    eval "zle -N fzf-g$c-widget"
+    eval "bindkey '^g^$c' fzf-g$c-widget"
+  done
+}
+bind-git-helper f b t r h
+unset -f bind-git-helper
diff --git a/init.vim b/init.vim
new file mode 100644
index 0000000..400e94f
--- /dev/null
+++ b/init.vim
@@ -0,0 +1,170 @@
+call plug#begin(stdpath('data') . '/plugged')
+
+"Plug 'Olical/conjure', { 'for': 'clojure', 'do': 'bin/compile' }
+"Plug 'Olical/vim-scheme', { 'for': 'scheme', 'on': 'SchemeConnect' }
+Plug 'PeterRincker/vim-argumentative'
+"Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
+Plug 'airblade/vim-gitgutter'
+"Plug 'clojure-vim/acid.nvim', { 'do': ':UpdateRemotePlugins' }
+Plug 'clojure-vim/async-clj-omni', { 'for': 'clojure' }
+Plug 'ctrlpvim/ctrlp.vim'
+Plug 'easymotion/vim-easymotion'
+Plug 'embear/vim-localvimrc'
+Plug 'guns/vim-clojure-highlight', { 'for': 'clojure'}
+Plug 'guns/vim-clojure-static', { 'for': 'clojure' }
+Plug 'guns/vim-sexp'
+Plug 'itchyny/lightline.vim'
+Plug 'jiangmiao/auto-pairs'
+Plug 'junegunn/fzf' | Plug 'junegunn/fzf.vim'
+Plug 'kien/rainbow_parentheses.vim'
+Plug 'liuchengxu/vim-better-default'
+Plug 'liuchengxu/vim-clap'
+Plug 'machakann/vim-highlightedyank'
+Plug 'ncm2/float-preview.nvim'
+Plug 'ncm2/ncm2'
+Plug 'ncm2/ncm2-bufword'
+Plug 'ncm2/ncm2-path'
+"Plug 'neoclide/coc.nvim', {'branch': 'release'}
+Plug 'radenling/vim-dispatch-neovim'
+Plug 'rafi/awesome-vim-colorschemes'
+Plug 'roxma/nvim-yarp'
+Plug 'simnalamburt/vim-mundo'
+Plug 'snoe/clj-refactor.nvim', { 'for': 'clojure', 'do': ':UpdateRemotePlugins' }
+Plug 'srcery-colors/srcery-vim'
+Plug 'tpope/vim-abolish'
+Plug 'tpope/vim-commentary'
+Plug 'tpope/vim-dadbod'
+Plug 'tpope/vim-dispatch'
+Plug 'tpope/vim-eunuch'
+Plug 'tpope/vim-fireplace', { 'for': 'clojure', 'on': 'FireplaceConnect' }
+Plug 'tpope/vim-fugitive'
+Plug 'tpope/vim-obsession'
+Plug 'tpope/vim-repeat'
+Plug 'tpope/vim-sexp-mappings-for-regular-people'
+Plug 'tpope/vim-sleuth'
+Plug 'tpope/vim-speeddating'
+Plug 'tpope/vim-surround'
+Plug 'tpope/vim-tbone'
+Plug 'tpope/vim-unimpaired'
+Plug 'tpope/vim-vinegar'
+Plug 'venantius/vim-cljfmt', { 'for': 'clojure' }
+"Plug 'vim-airline/vim-airline' | Plug 'vim-airline/vim-airline-themes'
+Plug 'w0rp/ale'
+
+call plug#end()
+
+" enable ncm2 for all buffers
+autocmd BufEnter * call ncm2#enable_for_buffer()
+
+" IMPORTANT: :help Ncm2PopupOpen for more information
+set completeopt=noinsert,menuone,noselect
+
+"let g:python2_host_prog = '/home/linuxbrew/.linuxbrew/bin/python'
+"let g:python3_host_prog = '/home/linuxbrew/.linuxbrew/bin/python3'
+"let g:deoplete#enable_at_startup = 1
+"call deoplete#custom#option('keyword_patterns', {'clojure': '[\w!$%&*+/:<=>?@\^_~\-\.#]*'})
+"set completeopt-=preview
+
+let g:float_preview#docked = 1
+"let g:float_preview#docked = 0
+"let g:float_preview#max_width = 80
+"let g:float_preview#max_height = 40
+
+let g:ale_linters = {
+      \ 'clojure': ['clj-kondo', 'joker']
+      \}
+let g:ale_fixers = { '*': ['remove_trailing_lines', 'trim_whitespace'], }
+let g:ale_fix_on_save = 1
+
+let g:lightline = {
+      \ 'colorscheme': 'srcery',
+      "\ 'colorscheme': 'one',
+      "\ 'colorscheme': 'darcula',
+      "\ 'colorscheme': 'selenized_dark',
+      \ }
+
+nnoremap <leader>ff :Files<cr>
+nnoremap <leader>fg :Rg<cr>
+nnoremap <leader>fb :Buffers<cr>
+nnoremap <leader>fc :Commands<cr>
+nnoremap <leader>fh :Helptags<cr>
+nnoremap <leader>fm :Maps<cr>
+nnoremap <leader>f: :History:<cr>
+nnoremap <leader>ft :Filetypes<cr>
+nnoremap <leader>fr :History<cr>
+nnoremap <leader>* :Rg <c-r><c-w><cr>
+
+command! -bang -nargs=* Rg
+  \ call fzf#vim#grep(
+  \   'rg --hidden -g "!.git/" --column --line-number --no-heading --color=never '.shellescape(<q-args>), 1,
+  \   <bang>0 ? fzf#vim#with_preview('up:60%')
+  \           : fzf#vim#with_preview('right:50%:hidden', '?'),
+  \   <bang>0)
+let g:airline_theme='base16_spacemacs'
+let g:vim_better_default_persistent_undo = 1
+
+runtime! plugin/default.vim
+
+set undodir=~/.config/nvim/undo
+set wrap
+set clipboard-=unnamedplus
+let g:clap_provider_grep_delay = 50
+let g:clap_provider_grep_opts = '-H --no-heading --vimgrep --smart-case --hidden -g "!.git/"'
+
+nnoremap <leader>* :Clap grep ++query=<cword><cr>
+nnoremap <leader>fg :Clap grep<cr>
+nnoremap <leader>ff :Clap files --hidden<cr>
+nnoremap <leader>fb :Clap buffers<cr>
+nnoremap <leader>fw :Clap windows<cr>
+nnoremap <leader>fr :Clap history<cr>
+nnoremap <leader>fh :Clap command_history<cr>
+nnoremap <leader>fj :Clap jumps<cr>
+nnoremap <leader>fl :Clap blines<cr>
+nnoremap <leader>fL :Clap lines<cr>
+nnoremap <leader>ft :Clap filetypes<cr>
+nnoremap <leader>fm :Clap marks<cr>
+
+map <leader>j <plug>(easymotion-prefix)
+autocmd FileType clojure nnoremap <buffer> <localleader>re :Eval<cr>
+autocmd FileType clojure vnoremap <buffer> <localleader>re :Eval<cr>
+autocmd FileType clojure nnoremap <buffer> <localleader>rf :%Eval<cr>
+autocmd FileType clojure nnoremap <buffer> <localleader>rr :Require<cr>
+autocmd FileType clojure nnoremap <buffer> <localleader>rR :Require!<cr>
+autocmd FileType clojure nnoremap <buffer> <localleader>rt :RunTests<cr>
+autocmd FileType clojure nnoremap <buffer> <localleader>rl :Last<cr>
+autocmd FileType clojure nnoremap <buffer> <localleader>rc :FireplaceConnect<cr>
+autocmd FileType clojure nnoremap <buffer> gd :normal [<c-d><cr>
+nnoremap <leader>gs :Gstatus<cr>
+nnoremap <leader>gb :Gblame<cr>
+nnoremap <leader>gd :Gdiff<cr>
+nnoremap <leader>gp :Gpush<cr>
+nnoremap <leader>gl :Gpull<cr>
+nnoremap <leader>gf :Gfetch<cr>
+nnoremap <leader>gcc :Gcommit --verbose<cr>
+nnoremap <leader>gca :Gcommit --all --verbose<cr>
+nnoremap <leader>gdl :diffget LOCAL<CR>
+nnoremap <leader>gdr :diffget REMOTE<CR>
+let g:localvimrc_persistent = 1
+nnoremap <leader>ut :MundoToggle<cr>
+
+"colorscheme space-vim-dark
+colorscheme srcery
+
+set termguicolors
+set list
+set spell
+set wildmenu
+set wildmode=list:longest,full
+set mouse=a
+set updatetime=100
+set sessionoptions=blank,curdir,folds,help,tabpages,winsize
+set inccommand=split
+
+au VimEnter * RainbowParenthesesToggle
+au Syntax * RainbowParenthesesLoadRound
+au Syntax * RainbowParenthesesLoadSquare
+au Syntax * RainbowParenthesesLoadBraces
+
+set number
+set norelativenumber
+
diff --git a/starship.toml b/starship.toml
new file mode 100644
index 0000000..0d277c7
--- /dev/null
+++ b/starship.toml
@@ -0,0 +1,38 @@
+prompt_order = [
+    "username",
+    "hostname",
+    "kubernetes",
+    "directory",
+    "git_branch",
+    "git_state",
+    "git_status",
+    "package",
+    "dotnet",
+    "golang",
+    "haskell",
+    "java",
+    "nodejs",
+    "python",
+    "ruby",
+    "rust",
+    "nix_shell",
+    "memory_usage",
+    "aws",
+    "env_var",
+    "battery",
+    "cmd_duration",
+    "time",
+    "line_break",
+    "jobs",
+    "character",
+]
+
+[time]
+disabled = false
+#format = "🕙[ %T %D ]"
+format = "🕙[ %T %v ]"
+
+#[character]
+#symbol = "⮞"
+#vicmd_symbol = "⮜"
+