From b8bc1ad2af6aab7f9dd3937c78dab76b0c32bdca Mon Sep 17 00:00:00 2001 From: Horus3 Date: Sun, 27 Apr 2014 18:14:37 +0200 Subject: Vim mapping and zsh alias. --- vim/.vimrc | 4 ++++ zsh/.zsh_aliases | 1 + zsh/.zsh_prg | 25 ------------------------- zsh/.zsh_prog | 25 +++++++++++++++++++++++++ zsh/.zshrc | 8 ++++++++ 5 files changed, 38 insertions(+), 25 deletions(-) delete mode 100644 zsh/.zsh_prg create mode 100644 zsh/.zsh_prog diff --git a/vim/.vimrc b/vim/.vimrc index c6da008..19c8833 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -13,3 +13,7 @@ syntax enable set encoding=utf8 "map! jj +command W w +command Q q +command WQ wq +command Wq wq diff --git a/zsh/.zsh_aliases b/zsh/.zsh_aliases index ad3cd8e..ef59608 100644 --- a/zsh/.zsh_aliases +++ b/zsh/.zsh_aliases @@ -16,3 +16,4 @@ alias nano='nano -wc' alias du='du -h' alias down='sudo shutdown -hP now' alias df='df -h' +alias lll='ls -lisa' diff --git a/zsh/.zsh_prg b/zsh/.zsh_prg deleted file mode 100644 index 51f63f5..0000000 --- a/zsh/.zsh_prg +++ /dev/null @@ -1,25 +0,0 @@ -ex () -{ - if [ -f $1 ] ; then - case $1 in - *.tar.bz2) tar xjf $1 ;; - *.tar.gz) tar xzf $1 ;; - *.bz2) bunzip2 $1 ;; - *.rar) unrar x $1 ;; - *.gz) gunzip $1 ;; - *.tar) tar xf $1 ;; - *.tbz2) tar xjf $1 ;; - *.tgz) tar xzf $1 ;; - *.zip) unzip $1 ;; - *.Z) uncompress $1;; - *.7z) 7z x $1 ;; - *) echo "'$1' cannot be extracted via ex()" ;; - esac - else - echo "'$1' is not a valid file" - fi -} - -calc(){ - echo "scale=3;$@" | bc -l -} diff --git a/zsh/.zsh_prog b/zsh/.zsh_prog new file mode 100644 index 0000000..51f63f5 --- /dev/null +++ b/zsh/.zsh_prog @@ -0,0 +1,25 @@ +ex () +{ + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted via ex()" ;; + esac + else + echo "'$1' is not a valid file" + fi +} + +calc(){ + echo "scale=3;$@" | bc -l +} diff --git a/zsh/.zshrc b/zsh/.zshrc index 612f5c1..95c5018 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -3325,3 +3325,11 @@ fi if [ -f ~/.zsh_dirstack ]; then . ~/.zsh_dirstack fi + +if [ -f ~/.zsh_prog ]; then + . ~/.zsh_prog +fi + +if [ -f ~/.zshrc_orig ]; then + . ~/.zshrc_orig +fi -- cgit v1.2.3