From 926cfdfc89fb90aba6f97947a50552e73bb18018 Mon Sep 17 00:00:00 2001 From: Thomas Bahn Date: Fri, 28 Apr 2017 11:12:54 +0200 Subject: [PATCH] Own preferences --- runcoms/zpreztorc | 26 +++++++++++++++----------- runcoms/zprofile | 13 +++++++++---- runcoms/zshrc | 10 ++++++++++ 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index f0046377e5..e4b9a6c3f6 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -33,13 +33,17 @@ zstyle ':prezto:load' pmodule \ 'environment' \ 'terminal' \ 'editor' \ + 'git' \ 'history' \ 'directory' \ 'spectrum' \ 'utility' \ 'completion' \ + 'syntax-highlighting' \ 'history-substring-search' \ - 'prompt' + 'autosuggestions' \ + 'prompt' \ + 'archive' # # Autosuggestions @@ -64,7 +68,7 @@ zstyle ':prezto:load' pmodule \ # zstyle ':prezto:module:editor' wordchars '*?_-.[]~&;!#$%^(){}<>' # Set the key mapping style to 'emacs' or 'vi'. -zstyle ':prezto:module:editor' key-bindings 'emacs' +zstyle ':prezto:module:editor' key-bindings 'vi' # Auto convert .... to ../.. # zstyle ':prezto:module:editor' dot-expansion 'yes' @@ -145,7 +149,7 @@ zstyle ':prezto:module:editor' key-bindings 'emacs' # 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 'sorin' +zstyle ':prezto:module:prompt' theme 'powerlevel10k' # Set the working directory prompt display length. # By default, it is set to 'short'. Set it to 'long' (without '~' expansion) @@ -196,14 +200,14 @@ zstyle ':prezto:module:prompt' theme 'sorin' # Set syntax highlighters. # By default, only the main highlighter is enabled. -# zstyle ':prezto:module:syntax-highlighting' highlighters \ -# 'main' \ -# 'brackets' \ +zstyle ':prezto:module:syntax-highlighting' highlighters \ + 'main' \ + 'brackets' \ + 'root' # 'pattern' \ # 'line' \ # 'cursor' \ -# 'root' -# + # Set syntax highlighting styles. # zstyle ':prezto:module:syntax-highlighting' styles \ # 'builtin' 'bg=blue' \ @@ -219,13 +223,13 @@ zstyle ':prezto:module:prompt' theme 'sorin' # # Auto set the tab and window titles. -# zstyle ':prezto:module:terminal' auto-title 'yes' +zstyle ':prezto:module:terminal' auto-title 'yes' # Set the window title format. -# zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s' +zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s' # Set the tab title format. -# zstyle ':prezto:module:terminal:tab-title' format '%m: %s' +zstyle ':prezto:module:terminal:tab-title' format '%m: %s' # Set the terminal multiplexer title format. # zstyle ':prezto:module:terminal:multiplexer-title' format '%s' diff --git a/runcoms/zprofile b/runcoms/zprofile index d2acd31145..5161147982 100644 --- a/runcoms/zprofile +++ b/runcoms/zprofile @@ -17,11 +17,15 @@ fi # Editors # -if [[ -z "$EDITOR" ]]; then - export EDITOR='nano' +if [[ -z "$EDITOR" ]] && (( $+commands[nvim] )); then + export EDITOR='nvim' +else + export EDITOR='vim' fi -if [[ -z "$VISUAL" ]]; then - export VISUAL='nano' +if [[ -z "$VISUAL" ]] && (( $+commands[nvim] )); then + export VISUAL='nvim' +else + export VISUAL='vim' fi if [[ -z "$PAGER" ]]; then export PAGER='less' @@ -53,6 +57,7 @@ path=( /opt/{homebrew,local}/{,s}bin(N) /usr/local/{,s}bin(N) $path + $HOME/.cargo/bin(N) ) # diff --git a/runcoms/zshrc b/runcoms/zshrc index 039b882d88..b616c897ff 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -1,3 +1,10 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block, everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + # # Executes commands at the start of an interactive session. # @@ -11,3 +18,6 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then fi # Customize to your needs... + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh