From 0d0ab30fb0af8245c19244931db6b84dfb4abd8b Mon Sep 17 00:00:00 2001 From: Austen Date: Tue, 15 Jul 2014 20:41:01 -0400 Subject: [PATCH] Added tabular to vimrc. Added f and cinitify bash function --- bashrc | 36 ++++++++++++++++++++++++++++-------- vimrc | 1 + 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/bashrc b/bashrc index 96f3b82..0c70af1 100644 --- a/bashrc +++ b/bashrc @@ -125,19 +125,27 @@ alias remove='sudo apt-get remove' alias update='sudo apt-get update' alias upgrade='sudo apt-get upgrade' alias autoremove='sudo apt-get autoremove' -alias ..='cl ..' -alias ...='cl ../..' -alias ....='cl ../../..' -alias .....='cl ../../../..' -alias ......='cl ../../../../..' -alias .......='cl ../../../../../..' -alias ........='cl ../../../../../../..' -alias .........='cl ../../../../../../../..' +alias ..='f ..' +alias ...='f ../..' +alias ....='f ../../..' +alias .....='f ../../../..' +alias ......='f ../../../../..' +alias .......='f ../../../../../..' +alias ........='f ../../../../../../..' +alias .........='f ../../../../../../../..' alias ytdl="youtube-dl $@ -x --audio-format mp3 --audio-quality 0 -c -o '%(title)s.%(ext)s'" alias tux="tmux a||tmux" alias rmgit="git remote rm origin;git remote rm https;git remote rm oOrigin;git remote rm oHttps" function mcl(){ mkdir "$@"&&cl "$@"; } function cl(){ cd "$@" && ls; } +function f(){ + if [ -d "$@" ] ; then + cd "$@" && ls + elif [ -f "$@" ] ; then + vim "$@" + fi +} +complete -f f function ovim(){ vim +"SessionOpen $@"; } function ogvim(){ gvim +"SessionOpen $@"; } function tsh(){ @@ -180,6 +188,18 @@ extract () { fi } export -f extract +function cinitify(){ + mkdir $2 + cd $2 + git init + git remote add origin git@98.26.78.121:$1/$2.git + git remote add https https://98.26.78.121/gitlab/$1/$2.git + #Offline mode + git remote add oOrigin git@10.0.1.200:$1/$2.git + git remote add oHttps https://10.0.1.200/gitlab/$1/$2.git + git remote -v +} +export -f cinitify function initify(){ git init git remote add origin git@98.26.78.121:$1/$2.git diff --git a/vimrc b/vimrc index 385ea67..fc57349 100644 --- a/vimrc +++ b/vimrc @@ -200,6 +200,7 @@ Bundle 'mbbill/undotree' Bundle 'vim-php/vim-php-refactoring' Bundle 'tpope/vim-fugitive' Bundle 'kien/ctrlp.vim' +Bundle 'godlygeek/tabular' "Bundle 'Floobits/floobits-vim' "Bundle 'tsaleh/vim-matchit' "Bundle 'Shougo/neosnippet'