Merge pull request #79 from cyplo/prezto
Switch from oh-my-zsh to prezto
This commit is contained in:
commit
bece486eef
9 changed files with 267 additions and 38 deletions
9
.gitmodules
vendored
9
.gitmodules
vendored
|
@ -1,15 +1,12 @@
|
|||
[submodule ".oh-my-zsh"]
|
||||
path = .oh-my-zsh
|
||||
url = git://github.com/robbyrussell/oh-my-zsh.git
|
||||
[submodule "tools/icdiff.git"]
|
||||
path = tools/icdiff.git
|
||||
url = https://github.com/jeffkaufman/icdiff.git
|
||||
[submodule "tools/subuser"]
|
||||
path = tools/subuser
|
||||
url = https://github.com/subuser-security/subuser
|
||||
[submodule ".oh-my-zsh-plugins/zsh-syntax-highlighting"]
|
||||
path = .oh-my-zsh-plugins/zsh-syntax-highlighting
|
||||
url = git://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||
[submodule ".vim/bundle/Vundle.vim"]
|
||||
path = .vim/bundle/Vundle.vim
|
||||
url = https://github.com/VundleVim/Vundle.vim.git
|
||||
[submodule ".zprezto"]
|
||||
path = .zprezto
|
||||
url = https://github.com/sorin-ionescu/prezto.git
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit cff228e342a797b6ac0da7edb431f5f66de79ae4
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 3dc574190071ef59054f6d693132410b37aa3ae4
|
1
.zprezto
Submodule
1
.zprezto
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 4f19700919c8ebbaf75755fc0d03716d13183f49
|
168
.zpreztorc
Normal file
168
.zpreztorc
Normal file
|
@ -0,0 +1,168 @@
|
|||
#
|
||||
# General
|
||||
#
|
||||
|
||||
# Set case-sensitivity for completion, history lookup, etc.
|
||||
# zstyle ':prezto:*:*' case-sensitive 'yes'
|
||||
|
||||
# Color output (auto set to 'no' on dumb terminals).
|
||||
zstyle ':prezto:*:*' color 'yes'
|
||||
|
||||
# Set the Zsh modules to load (man zshmodules).
|
||||
# zstyle ':prezto:load' zmodule 'attr' 'stat'
|
||||
|
||||
# Set the Zsh functions to load (man zshcontrib).
|
||||
# zstyle ':prezto:load' zfunction 'zargs' 'zmv'
|
||||
|
||||
# Set the Prezto modules to load (browse modules).
|
||||
# The order matters.
|
||||
zstyle ':prezto:load' pmodule \
|
||||
'environment' \
|
||||
'terminal' \
|
||||
'editor' \
|
||||
'history' \
|
||||
'directory' \
|
||||
'spectrum' \
|
||||
'utility' \
|
||||
'completion' \
|
||||
'prompt' \
|
||||
'archive' \
|
||||
'autosuggestions' \
|
||||
'fasd' \
|
||||
'git' \
|
||||
'history-substring-search' \
|
||||
'node' \
|
||||
'python' \
|
||||
'ssh' \
|
||||
'tmux'
|
||||
|
||||
|
||||
#
|
||||
# Autosuggestions
|
||||
#
|
||||
|
||||
# Set the query found color.
|
||||
# zstyle ':prezto:module:autosuggestions:color' found ''
|
||||
|
||||
#
|
||||
# Editor
|
||||
#
|
||||
|
||||
# Set the key mapping style to 'emacs' or 'vi'.
|
||||
zstyle ':prezto:module:editor' key-bindings 'vi'
|
||||
|
||||
# Auto convert .... to ../..
|
||||
# zstyle ':prezto:module:editor' dot-expansion 'yes'
|
||||
|
||||
#
|
||||
# Git
|
||||
#
|
||||
|
||||
# Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'.
|
||||
# zstyle ':prezto:module:git:status:ignore' submodules 'all'
|
||||
|
||||
#
|
||||
# GNU Utility
|
||||
#
|
||||
|
||||
# Set the command prefix on non-GNU systems.
|
||||
# zstyle ':prezto:module:gnu-utility' prefix 'g'
|
||||
|
||||
#
|
||||
# History Substring Search
|
||||
#
|
||||
|
||||
# Set the query found color.
|
||||
# zstyle ':prezto:module:history-substring-search:color' found ''
|
||||
|
||||
# Set the query not found color.
|
||||
# zstyle ':prezto:module:history-substring-search:color' not-found ''
|
||||
|
||||
# Set the search globbing flags.
|
||||
# zstyle ':prezto:module:history-substring-search' globbing-flags ''
|
||||
|
||||
#
|
||||
# Pacman
|
||||
#
|
||||
|
||||
# Set the Pacman frontend.
|
||||
# zstyle ':prezto:module:pacman' frontend 'yaourt'
|
||||
|
||||
#
|
||||
# Prompt
|
||||
#
|
||||
|
||||
# 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 'agnoster'
|
||||
|
||||
#
|
||||
# Ruby
|
||||
#
|
||||
|
||||
# Auto switch the Ruby version on directory change.
|
||||
# zstyle ':prezto:module:ruby:chruby' auto-switch 'yes'
|
||||
|
||||
#
|
||||
# Screen
|
||||
#
|
||||
|
||||
# Auto start a session when Zsh is launched in a local terminal.
|
||||
# zstyle ':prezto:module:screen:auto-start' local 'yes'
|
||||
|
||||
# Auto start a session when Zsh is launched in a SSH connection.
|
||||
# zstyle ':prezto:module:screen:auto-start' remote 'yes'
|
||||
|
||||
#
|
||||
# SSH
|
||||
#
|
||||
|
||||
# Set the SSH identities to load into the agent.
|
||||
# zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_rsa2' 'id_github'
|
||||
|
||||
#
|
||||
# Syntax Highlighting
|
||||
#
|
||||
|
||||
# Set syntax highlighters.
|
||||
# By default, only the main highlighter is enabled.
|
||||
# zstyle ':prezto:module:syntax-highlighting' highlighters \
|
||||
# 'main' \
|
||||
# 'brackets' \
|
||||
# 'pattern' \
|
||||
# 'line' \
|
||||
# 'cursor' \
|
||||
# 'root'
|
||||
#
|
||||
# Set syntax highlighting styles.
|
||||
# zstyle ':prezto:module:syntax-highlighting' styles \
|
||||
# 'builtin' 'bg=blue' \
|
||||
# 'command' 'bg=blue' \
|
||||
# 'function' 'bg=blue'
|
||||
|
||||
#
|
||||
# Terminal
|
||||
#
|
||||
|
||||
# Auto set the tab and window titles.
|
||||
# zstyle ':prezto:module:terminal' auto-title 'yes'
|
||||
|
||||
# Set the window title format.
|
||||
zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s'
|
||||
|
||||
# Set the tab title format.
|
||||
# zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
|
||||
|
||||
#
|
||||
# Tmux
|
||||
#
|
||||
|
||||
# Auto start a session when Zsh is launched in a local terminal.
|
||||
zstyle ':prezto:module:tmux:auto-start' local 'yes'
|
||||
|
||||
# Auto start a session when Zsh is launched in a SSH connection.
|
||||
# zstyle ':prezto:module:tmux:auto-start' remote 'yes'
|
||||
|
||||
# Integrate with iTerm2.
|
||||
# zstyle ':prezto:module:tmux:iterm' integrate 'yes'
|
80
.zprofile
Normal file
80
.zprofile
Normal file
|
@ -0,0 +1,80 @@
|
|||
#
|
||||
# Executes commands at login pre-zshrc.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
#
|
||||
# Browser
|
||||
#
|
||||
|
||||
if [[ "$OSTYPE" == darwin* ]]; then
|
||||
export BROWSER='open'
|
||||
fi
|
||||
|
||||
#
|
||||
# Editors
|
||||
#
|
||||
|
||||
export EDITOR='vim'
|
||||
export VISUAL='vim'
|
||||
export PAGER='less'
|
||||
|
||||
#
|
||||
# Language
|
||||
#
|
||||
|
||||
if [[ -z "$LANG" ]]; then
|
||||
export LANG='en_GB.UTF-8'
|
||||
fi
|
||||
|
||||
#
|
||||
# Paths
|
||||
#
|
||||
|
||||
# Ensure path arrays do not contain duplicates.
|
||||
typeset -gU cdpath fpath mailpath path
|
||||
|
||||
# Set the the list of directories that cd searches.
|
||||
# cdpath=(
|
||||
# $cdpath
|
||||
# )
|
||||
|
||||
|
||||
# Set the list of directories that Zsh searches for programs.
|
||||
path=(
|
||||
/usr/local/{bin,sbin}
|
||||
$path
|
||||
)
|
||||
|
||||
#
|
||||
# Less
|
||||
#
|
||||
|
||||
# Set the default Less options.
|
||||
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
|
||||
# Remove -X and -F (exit if the content fits on one screen) to enable it.
|
||||
export LESS='-F -g -i -M -R -S -w -X -z-4'
|
||||
|
||||
# Set the Less input preprocessor.
|
||||
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
|
||||
if (( $#commands[(i)lesspipe(|.sh)] )); then
|
||||
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
|
||||
fi
|
||||
|
||||
#
|
||||
# Temporary Files
|
||||
#
|
||||
|
||||
if [[ ! -d "$TMPDIR" ]]; then
|
||||
export TMPDIR="/tmp/$LOGNAME"
|
||||
mkdir -p -m 700 "$TMPDIR"
|
||||
fi
|
||||
|
||||
TMPPREFIX="${TMPDIR%/}/zsh"
|
||||
|
||||
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
|
||||
|
||||
# other common env vars
|
||||
source ~/.setenv
|
32
.zshrc
32
.zshrc
|
@ -1,12 +1,11 @@
|
|||
ZSH=$HOME/.oh-my-zsh
|
||||
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
|
||||
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
|
||||
fi
|
||||
|
||||
ZSH_THEME="agnoster"
|
||||
COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
plugins=(vi-mode svn git python zsh-syntax-highlighting history-substring-search)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
HISTFILE=~/.histfile
|
||||
HISTSIZE=10240
|
||||
SAVEHIST=10240
|
||||
|
@ -27,10 +26,9 @@ bindkey -M vicmd 'k' history-substring-search-up
|
|||
bindkey -M vicmd 'j' history-substring-search-down
|
||||
bindkey "^R" history-incremental-search-backward
|
||||
|
||||
# override prompt builder for the dir part
|
||||
# render just the last dir name
|
||||
|
||||
prompt_dir() {
|
||||
prompt_segment blue black '%1~'
|
||||
prompt_segment blue $PRIMARY_FG ' %1~ '
|
||||
}
|
||||
|
||||
# aliases
|
||||
|
@ -40,28 +38,8 @@ fi
|
|||
|
||||
if [[ `uname` =~ 'CYGWIN.*' ]]; then
|
||||
export DISPLAY=:0.0
|
||||
else
|
||||
alias tssh="torsocks ssh"
|
||||
alias tscp="torsocks scp"
|
||||
fi
|
||||
|
||||
alias benice="ionice -c3 nice -n20"
|
||||
|
||||
# stuff that checks if it's added to the .zshrc exipliclty
|
||||
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
|
||||
# other common env vars
|
||||
source ~/.setenv
|
||||
|
||||
# TMUX
|
||||
if which tmux >/dev/null 2>&1; then
|
||||
# if no session is started, start a new session
|
||||
test -z ${TMUX} && tmux
|
||||
|
||||
# when quitting tmux, try to attach
|
||||
while test -z ${TMUX}; do
|
||||
tmux attach || break
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
|
@ -36,10 +36,13 @@ ln -vfs "$DIR/.vim" ~/.
|
|||
ln -vfs "$DIR/.vimrc.linux" ~/.vimrc
|
||||
ln -vfs "$DIR/.tmux.conf" ~/.
|
||||
rm -f "~/.zshrc"
|
||||
ln -vfs "$DIR/.zshrc" ~/.
|
||||
ln -vfs "$DIR/.zprezto" ~/.
|
||||
ln -vfs "$DIR/.zpreztorc" ~/.zpreztorc
|
||||
ln -vfs "$DIR/.zprofile" ~/.zprofile
|
||||
ln -vfs "$DIR/.zprezto/runcoms/zshenv" ~/.zshenv
|
||||
ln -vfs "$DIR/.zshrc" ~/.zshrc
|
||||
|
||||
ln -vfs "$DIR/.setenv" ~/.
|
||||
ln -vfs "$DIR/.oh-my-zsh" ~/.
|
||||
ln -vfs "$DIR/.oh-my-zsh-plugins/zsh-syntax-highlighting" ~/.oh-my-zsh/custom/plugins/
|
||||
ln -vfs "$DIR/.Slic3r" ~/.
|
||||
ln -vfs "$DIR/.ghci" ~/.
|
||||
ln -vfs "$DIR/.conkyrc" ~/.
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
set +e
|
||||
|
||||
chmod ao-rwx ~/.ssh/id_rsa
|
||||
|
||||
set -e
|
||||
|
||||
DOTFILES_PATH="$HOME/dev/dotfiles"
|
||||
|
|
Loading…
Reference in a new issue