From 4ad3dfc644247bdf8b416e1e57acc0ae1c3d7268 Mon Sep 17 00:00:00 2001 From: Nigel Date: Wed, 3 Apr 2024 21:09:33 +0200 Subject: [PATCH] FEAT: Started install script Added completion and suggestions for fzf Set git Signin on by default Changed prefix key to C-z FIX: Made sure forward and backward search keymappings will still work --- git/.gitconfig | 2 ++ install.sh | 4 ++++ nvim | 2 +- tmux/.tmux.conf | 6 +++--- zsh/.zshrc | 18 ++++++++++++++---- 5 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 install.sh diff --git a/git/.gitconfig b/git/.gitconfig index 5a81069..99a4bf5 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -9,3 +9,5 @@ required = true [init] defaultBranch = main +[commit] + gpgsign = true diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..f82d917 --- /dev/null +++ b/install.sh @@ -0,0 +1,4 @@ +#!/bin/bash + + +git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm diff --git a/nvim b/nvim index c367bc0..e4ca8c6 160000 --- a/nvim +++ b/nvim @@ -1 +1 @@ -Subproject commit c367bc015070c7605cd43fb424bcdbf5a6116998 +Subproject commit e4ca8c6039a0d92e7f938e45b62c40ec1a09ed02 diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 4bd22c0..4b4aa33 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -6,7 +6,7 @@ # Rebind the prefix key unbind C-b -set-option -g prefix C-s +set-option -g prefix C-z # Map pane selection to more easy vim like bindings bind-key -n 'M-h' select-pane -L @@ -33,10 +33,10 @@ set -g @dracula-show-left-icon \uebc8 setw -g base-index 1 setw -g pane-base-index 1 # - This prevents me from having to press escape twice -set -s escape-time 0 +set -s escape-time 50 # allow mouse interaction set-option -g mouse on # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) -run '~/.tmux/plugins/tpm/tpm' \ No newline at end of file +run '~/.tmux/plugins/tpm/tpm' diff --git a/zsh/.zshrc b/zsh/.zshrc index 4650a67..e6fcba7 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -18,6 +18,8 @@ typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet export ZSH="/home/nigel/.oh-my-zsh" bindkey -v +bindkey '^R' history-incremental-search-backward +bindkey '^S' history-incremental-search-forward ZSH_THEME="lambda" @@ -33,10 +35,14 @@ ENABLE_CORRECTION="true" HIST_STAMPS="dd/mm/yyyy" # Which plugins would you like to load? -plugins=(git zsh-autosuggestions zsh-syntax-highlighting tmux debian themes) +plugins=(git vi-mode zsh-autosuggestions zsh-syntax-highlighting tmux debian themes) source $ZSH/oh-my-zsh.sh +# Add the fzf key-bindings and completions +source /usr/share/fzf/key-bindings.zsh +source /usr/share/fzf/completion.zsh + # User configuration source ~/.bashrc @@ -51,10 +57,10 @@ if [[ -n $SSH_CONNECTION ]]; then fi # Personal aliases -alias zshconfig="mate ~/.zshrc" -alias ohmyzsh="mate ~/.oh-my-zsh" +alias zshconfig="nvim ~/.zshrc" +alias ohmyzsh="nvim ~/.oh-my-zsh" alias dev="cd /home/nigel/Hacking/Development" - +alias dotfiles="cd /home/nigel/.dotfiles" # Set Environment Variables DOTNET_ROOT=$HOME/dotnet PATH=$PATH:$HOME/dotnet @@ -71,6 +77,9 @@ export PATH=$PATH:$HOME/llvm/build/bin export PATH=$PATH:/usr/local/bin/nvim/bin: export PATH=$PATH:/opt/gradle/gradle-8.7/bin +# Add GoLang +export PATH=$PATH:/usr/local/go/bin + # Add Autocompletion tools _dotnet_zsh_complete() @@ -85,5 +94,6 @@ source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh # zsh paramater for dotnet cli tab completion compctl -K _dotnet_zsh_complete dotnet +eval "$(fzf --zsh)" eval "$(starship init zsh)"