From 493462c24526b5eefa8cee41bf94421847936c4f Mon Sep 17 00:00:00 2001 From: daniel Date: Sun, 19 Mar 2023 11:28:18 +0100 Subject: [PATCH] fzf and some plugins --- install.sh | 17 ++++++++++++++--- profiles/base/.aliases | 4 ++++ profiles/base/.zsh_plugins.txt | 2 ++ profiles/base/.zshrc | 3 +++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index ac0b4b4..c4f27bf 100755 --- a/install.sh +++ b/install.sh @@ -25,13 +25,24 @@ else fi fi +# fzf +if [ ! -d "$HOME/.fzf" ]; then + git clone --depth 1 https://github.com/junegunn/fzf.git $HOME/.fzf + if [ ! -f "$HOME/.fzf/bin" ]; then + $HOME/.fzf/install --bin + fi +fi -# vundle + +# vimplug if [ ! -d "$HOME/.vim/autoload" ]; then echo "setup vim plug" - curl -fLo /.vim/autoload/plug.vim --create-dirs \ + curl -fLo $HOME/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim fi # linking dotfiles -$HOME/.dotfiles/dotfiles.sh link base +$HOME/.dotfiles/dotfiles.sh link base + +# reload shell +zsh diff --git a/profiles/base/.aliases b/profiles/base/.aliases index 4485285..b294711 100644 --- a/profiles/base/.aliases +++ b/profiles/base/.aliases @@ -1,3 +1,7 @@ # aliases alias clip='xsel --clipboard' alias ls='ls --color=auto -lh' + +if type nvim > /dev/null; then + alias vim=nvim +fi diff --git a/profiles/base/.zsh_plugins.txt b/profiles/base/.zsh_plugins.txt index 12da7e6..ad32b8f 100644 --- a/profiles/base/.zsh_plugins.txt +++ b/profiles/base/.zsh_plugins.txt @@ -12,3 +12,5 @@ zsh-users/zsh-autosuggestions # theme romkatv/powerlevel10k +ohmyzsh/ohmyzsh path:plugins/ssh-agent +sunlei/zsh-ssh diff --git a/profiles/base/.zshrc b/profiles/base/.zshrc index 1227957..bff16e1 100644 --- a/profiles/base/.zshrc +++ b/profiles/base/.zshrc @@ -33,3 +33,6 @@ antidote load # vim mode bindkey -v + +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh +bindkey '^f' fzf-file-widget