Permalink
Browse files

updates

  • Loading branch information...
Pradeek committed Feb 8, 2014
1 parent d7d64ee commit 0a011ba810bd3fb9890f156e7ac35c0ca9523872
Showing with 180 additions and 82 deletions.
  1. +2 −1 bash/aliases
  2. +21 −0 bash/functions
  3. +16 −0 bash/mac
  4. +141 −81 vimrc
View
@@ -32,7 +32,6 @@ alias agcss='ag -G .css'
alias aghtml='ag -G .html'
# Mercurial
-alias diff='hg diff --git -wBb'
alias import='hg import --no-commit'
alias undo='hg revert --all'
alias st='hg st'
@@ -58,3 +57,5 @@ alias t='vim ~/Dropbox/Notes/todo.txt'
# Vagrant helper
alias vagrant_ssh='ssh -i ~/.vagrant.d/insecure_private_key vagrant@'
+
+alias internet='ping 8.8.8.8'
View
@@ -119,3 +119,24 @@ function _jump {
complete -o default -o nospace -F _jump jump
complete -o default -o nospace -F _jump j
+# Git/Mercurial helpers
+
+function diff {
+ if [[ -d $PWD/.hg ]]; then
+ hg diff -wBb
+ else
+ if [[ -d $PWD/.git ]]; then
+ git diff
+ fi
+ fi
+}
+
+function push {
+ if [[ -d $PWD/.hg ]]; then
+ hg push
+ else
+ if [[ -d $PWD/.git ]]; then
+ git xpush
+ fi
+ fi
+}
View
@@ -4,6 +4,7 @@ alias vim='mvim -v'
alias resetdns='sudo killall -HUP mDNSResponder'
alias mail='open -a Mail.app'
alias preview='open -a Preview.app'
+alias emacs='open -a Emacs.app'
alias trash='ls ~/.Trash'
alias emptytrash='rm -rf ~/.Trash/*'
@@ -25,3 +26,18 @@ if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
. $(brew --prefix)/etc/bash_completion.d/vagrant
fi
+
+
+if [[ ( -z "$INSIDE_EMACS" || "$EMACS_BASH_COMPLETE" = "t" ) ]]; then
+ . $(brew --prefix)/etc/bash_completion
+ . $(brew --prefix)/etc/bash_completion.d/vagrant
+fi
+
+# Temporary alias to restart Virtualbox
+alias vbox_restart='sudo /Library/StartupItems/VirtualBox/VirtualBox restart'
+
+# Livereload everything
+alias livereload='watchmedo shell-command --patterns="*.py;*.html;*.css;*.js" --recursive --command "sleep 4 && chrome-reload-current"'
+
+# Vagrant
+alias vs='vagrant ssh'
Oops, something went wrong.

0 comments on commit 0a011ba

Please sign in to comment.