ADD: config for neovim
ADD: example git config with two useful aliases
This commit is contained in:
203
zshrc
Normal file
203
zshrc
Normal file
@@ -0,0 +1,203 @@
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH=$HOME/.config/zsh
|
||||
|
||||
# Set name of the theme to load --- if set to "random", it will
|
||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
||||
#ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
ZSH_THEME="agnoster"
|
||||
|
||||
# Set list of themes to pick from when loading at random
|
||||
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
|
||||
# If set to an empty array, this variable will have no effect.
|
||||
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to use hyphen-insensitive completion.
|
||||
# Case-sensitive completion must be off. _ and - will be interchangeable.
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
||||
# DISABLE_AUTO_UPDATE="true"
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# export UPDATE_ZSH_DAYS=13
|
||||
|
||||
# Uncomment the following line to disable colors in ls.
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment the following line to disable auto-setting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
# ENABLE_CORRECTION="true"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
# COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# Uncomment the following line if you want to change the command execution time
|
||||
# stamp shown in the history command output.
|
||||
# You can set one of the optional three formats:
|
||||
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||
# or set a custom format using the strftime function format specifications,
|
||||
# see 'man strftime' for details.
|
||||
# HIST_STAMPS="mm/dd/yyyy"
|
||||
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
ZSH_CUSTOM=$HOME/.config/zsh_custom
|
||||
|
||||
# Installation Path of FZF
|
||||
# export FZF_BASE=/usr/share/fzf
|
||||
|
||||
# FZF Default Command
|
||||
export FZF_DEFAULT_COMMAND='fd -c never -p "" "$(pwd)"'
|
||||
|
||||
# Which plugins would you like to load?
|
||||
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
|
||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
#
|
||||
# Standard plugins for all hosts
|
||||
plugins=(
|
||||
git
|
||||
git-lfs
|
||||
ssh-agent
|
||||
tmux
|
||||
vi-mode
|
||||
key_bindings
|
||||
dotfiles
|
||||
)
|
||||
|
||||
# Load host specific plugins
|
||||
# First find the hostname:
|
||||
hostname=`$ZSH_CUSTOM/functions/hostname.zsh`
|
||||
|
||||
if [[ -d "$ZSH_CUSTOM/hosts" && -r "$ZSH_CUSTOM/hosts/$hostname.zsh" ]]; then
|
||||
source "$ZSH_CUSTOM/hosts/$hostname.zsh"
|
||||
|
||||
else
|
||||
plugins+=(
|
||||
ansible
|
||||
#postgres
|
||||
#cargo
|
||||
#rust
|
||||
ruby
|
||||
gem
|
||||
systemd
|
||||
#vagrant
|
||||
vim-interaction
|
||||
fzf # Needs to go after "vi-mode" because remap of Ctrl+R
|
||||
)
|
||||
fi
|
||||
|
||||
# These plugins always need to be sourced at last
|
||||
plugins+=(
|
||||
history-substring-search
|
||||
fast-syntax-highlighting
|
||||
)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
cust_options=(
|
||||
APPEND_HISTORY
|
||||
HIST_REDUCE_BLANKS
|
||||
SHARE_HISTORY
|
||||
AUTO_MENU
|
||||
AUTO_LIST
|
||||
LIST_TYPES
|
||||
)
|
||||
|
||||
for o in $cust_options; do
|
||||
setopt $o
|
||||
done
|
||||
unset o
|
||||
|
||||
deoptions=(
|
||||
#MENU_COMPLETE
|
||||
)
|
||||
|
||||
for o in $deoptions; do
|
||||
unsetopt $o
|
||||
done
|
||||
unset o
|
||||
|
||||
#Preferred editor for local and remote sessions
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
export EDITOR='vim'
|
||||
elif [[ -x "$(which nvim)" ]]; then
|
||||
export EDITOR='nvim'
|
||||
elif [[ -x "$(which mvim)" ]]; then
|
||||
export EDITOR='mvim'
|
||||
fi
|
||||
|
||||
# Preferred visual editor
|
||||
#if [[ -x "$(which gnvim)" ]]; then
|
||||
#export VISUAL='gnvim'
|
||||
|
||||
if [[ -x "$(which nvim-qt)" ]]; then
|
||||
export VISUAL='nvim-qt --nofork'
|
||||
alias gnvim='nvim-qt'
|
||||
|
||||
elif [[ -x "$(which nvim-gtk)" ]]; then
|
||||
export VISUAL='nvim-gtk --nofork'
|
||||
alias gnvim='nvim-gtk'
|
||||
|
||||
elif [[ -x "$(which mvim)" ]]; then
|
||||
export VISUAL='mvim --nofork'
|
||||
alias gnvim='mvim'
|
||||
|
||||
fi
|
||||
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
# ssh
|
||||
# export SSH_KEY_PATH="~/.ssh/rsa_id"
|
||||
|
||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||
# For a full list of active aliases, run `alias`.
|
||||
#
|
||||
# Example aliases
|
||||
# alias zshconfig="mate ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
#[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
export MANROFFOPT="-c"
|
||||
export MANWIDTH=80
|
||||
# export MANPAGER="sh -c 'col -bx | bat -l man --tabs 4 --terminal-width 80'"
|
||||
export MANPAGER="sh -c 'col -b | bat -l man --tabs 4 --style plain'"
|
||||
# export MANPAGER="bat -l man --tabs 4 --terminal-width 80"
|
||||
export PAGER='less -F -c -Q -x 4 -J --mouse'
|
||||
|
||||
#[[ -f "$HOME/.profile" ]] && source $HOME/.profile
|
||||
|
||||
#[[ -f "/usr/share/autojump/autojump.zsh" ]] && source /usr/share/autojump/autojump.zsh
|
||||
eval "$(zoxide init zsh)"
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
|
||||
source /home/stefan_koenen/.config/broot/launcher/bash/br
|
Reference in New Issue
Block a user