aboutsummaryrefslogtreecommitdiff
path: root/external/zsh/plugins
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2020-12-23 23:40:35 +0530
committerAkshay Nair <phenax5@gmail.com>2020-12-23 23:40:35 +0530
commit66adff9257c0bdcf5fea357cf4afd9c5804ac9d9 (patch)
tree92b9941ed1b211594446c69e1c1a4d57240f1a0e /external/zsh/plugins
parentc69a505caac996f78b7b010dcc563672cb5a6019 (diff)
downloadnixos-config-66adff9257c0bdcf5fea357cf4afd9c5804ac9d9.tar.gz
nixos-config-66adff9257c0bdcf5fea357cf4afd9c5804ac9d9.zip
Moves zsh config to config and symlinked
Diffstat (limited to 'external/zsh/plugins')
-rw-r--r--external/zsh/plugins/completion.zsh11
-rw-r--r--external/zsh/plugins/fzf-history.zsh19
-rw-r--r--external/zsh/plugins/magic-enter.zsh29
-rw-r--r--external/zsh/plugins/manpage.zsh6
-rw-r--r--external/zsh/plugins/sudo.zsh35
5 files changed, 0 insertions, 100 deletions
diff --git a/external/zsh/plugins/completion.zsh b/external/zsh/plugins/completion.zsh
deleted file mode 100644
index bf6e731..0000000
--- a/external/zsh/plugins/completion.zsh
+++ /dev/null
@@ -1,11 +0,0 @@
-
-autoload -Uz compinit && compinit;
-# load bashcompinit for some old bash completions
-autoload bashcompinit && bashcompinit
-
-# partial completion suggestions
-zstyle ':completion:*' list-suffixes
-zstyle ':completion:*' expand prefix suffix
-
-# Case insensitive
-zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*'
diff --git a/external/zsh/plugins/fzf-history.zsh b/external/zsh/plugins/fzf-history.zsh
deleted file mode 100644
index f91cc99..0000000
--- a/external/zsh/plugins/fzf-history.zsh
+++ /dev/null
@@ -1,19 +0,0 @@
-full_history() {
- [[ ${@[-1]-} = *[0-9]* ]] && builtin fc -l "$@" || builtin fc -l "$@" 1;
-}
-
-trim() { sed 's/^\s*//g'; }
-reverse() { sed -n '1!G;h;$p'; }
-unique() { awk '!seen[$0]++'; }
-
-search_history() {
- local result=$(full_history | trim | cut -d' ' -f 2- | reverse | unique | fzf);
-
- # Replace the buffer with the editor output.
- print -Rz - "$(echo -n "$result" | trim)";
-
- zle send-break # Force reload from the buffer stack
-}
-
-zle -N search_history;
-bindkey '^R' search_history;
diff --git a/external/zsh/plugins/magic-enter.zsh b/external/zsh/plugins/magic-enter.zsh
deleted file mode 100644
index 5d50316..0000000
--- a/external/zsh/plugins/magic-enter.zsh
+++ /dev/null
@@ -1,29 +0,0 @@
-# Bind quick stuff to enter!
-#
-# Pressing enter in a git directory runs `git status`
-# in other directories `ls`
-magic-enter () {
- # If commands are not already set, use the defaults
- [ -z "$MAGIC_ENTER_GIT_COMMAND" ] && MAGIC_ENTER_GIT_COMMAND="git status -u ."
- [ -z "$MAGIC_ENTER_OTHER_COMMAND" ] && MAGIC_ENTER_OTHER_COMMAND="ls -lh ."
-
- if [[ -z $BUFFER ]]; then
- echo ""
- if git rev-parse --is-inside-work-tree &>/dev/null; then
- eval "$MAGIC_ENTER_GIT_COMMAND"
- else
- eval "$MAGIC_ENTER_OTHER_COMMAND"
- fi
- zle redisplay
- else
- zle accept-line
- fi
-}
-
-zle -N magic-enter
-
-bindkey "^M" magic-enter
-
-# Auto correct typos
-#setopt CORRECT
-#setopt CORRECT_ALL
diff --git a/external/zsh/plugins/manpage.zsh b/external/zsh/plugins/manpage.zsh
deleted file mode 100644
index 8c8c372..0000000
--- a/external/zsh/plugins/manpage.zsh
+++ /dev/null
@@ -1,6 +0,0 @@
-
-open-man() { macho; }
-
-zle -N open-man
-bindkey -M emacs '^_' open-man
-
diff --git a/external/zsh/plugins/sudo.zsh b/external/zsh/plugins/sudo.zsh
deleted file mode 100644
index fd43b93..0000000
--- a/external/zsh/plugins/sudo.zsh
+++ /dev/null
@@ -1,35 +0,0 @@
-# ------------------------------------------------------------------------------
-# Description
-# -----------
-#
-# sudo or sudoedit will be inserted before the command
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Dongweiming <ciici123@gmail.com>
-#
-# ------------------------------------------------------------------------------
-
-MAGIC_ENTER_GIT_COMMAND='git status';
-MAGIC_ENTER_OTHER_COMMAND='ls';
-
-sudo-command-line() {
- [[ -z $BUFFER ]] && zle up-history
- if [[ $BUFFER == sudo\ * ]]; then
- LBUFFER="${LBUFFER#sudo }"
- elif [[ $BUFFER == $EDITOR\ * ]]; then
- LBUFFER="${LBUFFER#$EDITOR }"
- LBUFFER="sudoedit $LBUFFER"
- elif [[ $BUFFER == sudoedit\ * ]]; then
- LBUFFER="${LBUFFER#sudoedit }"
- LBUFFER="$EDITOR $LBUFFER"
- else
- LBUFFER="sudo $LBUFFER"
- fi
-}
-
-zle -N sudo-command-line;
-bindkey '^Z' sudo-command-line;
-