#……stuff…… # Made from the excellent asyd’s zsh config : http://asyd.net/home/zsh extract () { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xvjf $1 ;; *.tar.gz) tar xvzf $1 ;; *.tar.xz) tar xvJf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) unrar x $1 ;; *.gz) gunzip $1 ;; *.tar) tar xvf $1 ;; *.tbz2) tar xvjf $1 ;; *.tgz) tar xvzf $1 ;; *.zip) unzip $1 ;; *.Z) uncompress $1 ;; *.7z) 7z x $1 ;; *.xz) unxz $1 ;; *.exe) cabextract $1 ;; *) echo "\`$1': unrecognized file compression" ;; esac else echo "\`$1' is not a valid file" fi } #LAZY BOY ! alias upgrade="sudo yaourt -Syu" alias install="sudo yaourt -S" alias remove="sudo yaourt -Rs" alias tma="tmux attach -t" alias tms="tmux new-session -s" # Alias pour les erreurs de clavier… alias exti="exit" alias eit="exit" alias iexit="exit" alias exiut="exit" alias irstall="install" alias installl="install" alias commit="git commit -a -m" alias pcmanfm="pcmanfm-mod" # Ouverture automatique ========================= alias -s {mpg,mpeg,avi,ogm,wmv,m4v,mp4,mov,mp3,m3u,pls,webm}="vlc" alias -s {html,php,com,net,org,gov}="firefox" alias -s {txt,c,h,conf,tex}="vim" alias -s pdf="apvlv" #================================================ #================================================ export LESS_TERMCAP_mb=$'\E[01;31m' # début de blink export LESS_TERMCAP_md=$'\E[01;31m' # début de gras export LESS_TERMCAP_me=$'\E[0m' # fin export LESS_TERMCAP_so=$'\E[01;44;33m' # début de la ligne d`état export LESS_TERMCAP_se=$'\E[0m' # fin export LESS_TERMCAP_us=$'\E[01;32m' # début de souligné export LESS_TERMCAP_ue=$'\E[0m' # fin export EDITOR=vim #================================================ # Mode vim ====================================== bindkey -v # On remappe pour le bépo bindkey -a c vi-backward-char bindkey -a r vi-forward-char bindkey -a t vi-down-line-or-history bindkey -a s vi-up-line-or-history bindkey -a $ vi-end-of-line bindkey -a 0 vi-digit-or-beginning-of-line bindkey -a h vi-change bindkey -a H vi-change-eol bindkey -a dd vi-change-whole-line bindkey -a l vi-replace-chars bindkey -a L vi-replace bindkey -a k vi-substitute #show mode of the vi-mode of zsh function zle-line-init zle-keymap-select { RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}" RPS2=$RPS1 zle reset-prompt } zle -N zle-line-init zle -N zle-keymap-select #================================================ autoload edit-command-line zle -N edit-command-line bindkey -M vicmd v edit-command-line clear figlet -f shadow "Narchie"