From b1f165c7c2bcc584b75c548a4e082b06f0503234 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Fri, 12 Jan 2018 12:23:58 -0500 Subject: [PATCH] Clean-up and better git aliases - Deleted old files from last semester and removed aliases for them. - Added useful flags onto common git command aliases. - Removed Markdown function, as it wasn't working for whatever reason. - Installed vim-auto-save and implemented shortcut. --- .gitignore | 1 + dotfiles/.bash_aliases | 32 +++++++++----------------------- dotfiles/.vimrc | 2 ++ 3 files changed, 12 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 7be4e0a..7f101a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.swp temp.sh +konsole.shortcuts diff --git a/dotfiles/.bash_aliases b/dotfiles/.bash_aliases index c5177b3..3b6077f 100644 --- a/dotfiles/.bash_aliases +++ b/dotfiles/.bash_aliases @@ -22,27 +22,7 @@ alias cdd="c ~/Downloads" if $in_lab; then ff() { firefox $1 ; } zip() { tar -zcvf $1.tar.gz $1/ ; } - - alias mt="ok ~/Downloads/Textbook.pdf" alias nau="nautilus ." - - # 207 - alias 7r="c ~/207/group_0485/" - alias ph2="c ~/207/group_0485/phase2" - alias fph2="ff ~/207/group_0485/phase2/p2.html" - alias gin="vi ~/207/group_0485/phase2/commit_issue_numbers.txt" - alias rp2="ph2 && ./src/compile_project.sh" - - # 258 - alias l52="c ~/258/258-labs-self/l5/p2" - alias p3="c ~/258/258-labs-self/l7/p3" - alias l7="c ~/258/258-labs-self/l7" - alias lab="c ~/258/258-labs-self" - alias rad="echo radix unsigned" - alias go="c ~/258/going-bananas" - alias gob="c ~/258/going-bananas/banana" - alias gom="c ~/258/going-bananas/monkey" - else alias school="c Documents/School/" @@ -75,12 +55,13 @@ alias r=". ~/.bashrc" # git . ~/.secure alias gs="git status -u" -alias gpl="git pull" +alias gpl="git pull --rebase" +alias grbc="git rebase --continue" alias gps="git push" alias vig="vi .gitignore" -alias ga="git add *" +alias ga="git add -A *" alias gai="git add .gitignore" -alias gd="git diff" +alias gd="git diff -w" alias gdc="git diff --cached" alias gstore="git config credential.helper store" gca(){ git commit -m "$1" ; } @@ -90,6 +71,11 @@ alias gsl="git shortlog" alias gst="git stash" alias gstp="git stash pop" alias gclear="git stash clear" +gcho() { git checkout $1 ; } +gremotes() { + git remote set-url --add --push origin $1 + git remote set-url --add --push origin $2 +} # idea alias jh="echo $JAVA_HOME" diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index 22317ca..d493772 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -20,6 +20,7 @@ Plug 'whatyouhide/vim-gotham' Plug 'nathanaelkane/vim-indent-guides' Plug 'flazz/vim-colorschemes' Plug 'felixhummel/setcolors.vim' +Plug '907th/vim-auto-save' " Plug 'artur-shaik/vim-javacomplete2' " autocmd FileType java setlocal omnifunc=javacomplete#Complete @@ -30,6 +31,7 @@ colorscheme gotham256 map :wa map :wqa map :qa! +map :AutoSaveToggle map :PlugInstall map :.,$s/:\(\w\)/: \1/g " map o