Merge branch 'master' of git.epichack.com:barak/dotfiles

This commit is contained in:
Barak Michener 2014-09-12 15:59:56 -04:00
commit 620f507527
7 changed files with 102 additions and 3 deletions

View file

@ -90,6 +90,11 @@ alias srsly="orly -s"
alias whothefuckis='finger'
alias whoami="echo 24601"
dobenchx() {
benchcmp $1 $2 | awk -f $HOME/bin/benchx.awk
}
alias benchx=dobenchx
#function gvim () {
#`which gvim` $* &> /dev/null
#}

11
.bashrc
View file

@ -150,3 +150,14 @@ if [ -n "`which fortune`" ]; then
fortune
fi
# The next line updates PATH for the Google Cloud SDK.
if [ -f ~/local/google-cloud-sdk/path.bash.inc ]; then
. ~/local/google-cloud-sdk/path.bash.inc
fi
# The next line enables bash completion for gcloud.
if [ -f ~/local/google-cloud-sdk/completion.bash.inc ]; then
. ~/local/google-cloud-sdk/completion.bash.inc
fi

View file

@ -18,15 +18,20 @@
(depends-on "exec-path-from-shell")
(depends-on "flx-ido")
(depends-on "flycheck")
(depends-on "git-gutter")
(depends-on "go-autocomplete")
(depends-on "go-mode")
(depends-on "go-mode")
(depends-on "grizzl")
(depends-on "jedi")
(depends-on "key-chord")
(depends-on "magit")
(depends-on "neotree")
(depends-on "pallet")
(depends-on "powerline")
(depends-on "powerline-evil")
(depends-on "projectile")
(depends-on "relative-buffers")
(depends-on "tabbar")
(depends-on "yasnippet")
(depends-on "zenburn-theme")

View file

@ -8,6 +8,10 @@
(and (char-or-string-p obj) (not (stringp obj)))))
(fset 'yes-or-no-p 'y-or-n-p)
(menu-bar-mode -1)
(setq tab-width 4)
(setq indent-tabs-mode nil)
;; Package Manager
;; See ~Cask~ file for its configuration
@ -24,6 +28,7 @@
(setq root-dir (file-name-directory
(or (buffer-file-name) load-file-name)))
(setq make-backup-files nil)
(setq auto-save-default nil)
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
;; Don't show startup screen
@ -51,6 +56,42 @@
(require 'exec-path-from-shell)
(when (memq window-system '(mac ns))
(exec-path-from-shell-initialize))
(global-relative-buffers-mode)
;; Tabbar
(defun autohide-tabbar ()
"Make tabbar briefly show itself while you are switching
buffers with shortcuts. Tested with GNU Emacs 23."
(defvar *tabbar-autohide-delay* 3)
(interactive)
(tabbar-mode nil)
(defvar *tabbar-autohide-timer* nil)
(defun renew-tabbar-autohide-timer ()
(if (timerp *tabbar-autohide-timer*)
(cancel-timer *tabbar-autohide-timer*))
(setf *tabbar-autohide-timer*
(run-with-timer
3 nil (lambda ()
(tabbar-mode -1)
(setf *tabbar-autohide-timer*
nil)))))
(global-set-key
[C-next]
(lambda ()
(interactive)
(if tabbar-mode
(tabbar-forward)
(tabbar-mode 1))
(renew-tabbar-autohide-timer)))
(global-set-key
[C-prior]
(lambda ()
(interactive)
(if tabbar-mode
(tabbar-backward)
(tabbar-mode 1))
(renew-tabbar-autohide-timer))))
(autohide-tabbar)
;; Evil!
(require 'evil-leader)
@ -70,6 +111,11 @@
(eval-after-load 'magit
(progn '(global-set-key (kbd "C-x g") 'magit-status)))
;; gitgutter
(global-git-gutter-mode)
(custom-set-variables
'(git-gutter:hide-gutter t))
;; flx-ido completion system, recommended by Projectile
(require 'flx-ido)
(require 'grizzl)
@ -113,12 +159,27 @@
(require 'key-chord)
(require 'tabbar)
;; Functions
(defun move-cursor-next-pane ()
"Move cursor to the next pane."
(interactive)
(other-window 1))
(defun move-cursor-previous-pane ()
"Move cursor to the previous pane."
(interactive)
(other-window -1))
;; Evil Key Defines
(define-key evil-normal-state-map "gc" 'kill-buffer-and-window)
(define-key evil-normal-state-map "gn" 'tabbar-forward-tab)
(define-key evil-normal-state-map "gp" 'tabbar-backward-tab)
(define-key evil-normal-state-map (kbd "C-e") 'move-end-of-line)
(define-key evil-normal-state-map (kbd "C-a") 'move-beginning-of-line)
(define-key evil-normal-state-map (kbd "C-j") 'move-cursor-next-pane)
(define-key evil-normal-state-map (kbd "C-k") 'move-cursor-previous-pane)
(define-key evil-insert-state-map (kbd "C-e") 'move-end-of-line)
(define-key evil-insert-state-map (kbd "C-a") 'move-beginning-of-line)
;(setq key-chord-two-keys-delay 0.5)
@ -140,6 +201,8 @@
;; |_\__,_|_||_\__, |\_,_\__,_\__, \___/__/
;; |___/ |___/
(add-hook 'go-mode-hook (lambda ()
(add-hook 'before-save-hook #'gofmt-before-save)
(setq indent-tabs-mode t)
(set (make-local-variable 'company-backends) '(company-go))
(company-mode)))

View file

@ -27,6 +27,6 @@ data.location=~/.task
taskd.server=freecinc.com:53589
taskd.credentials=FreeCinc\/freecinc_d9da621f\/9b20be7a-db4e-45a3-aa6e-61173f5988e4
taskd.certificate=\/usr\/local\/google\/home\/barakmich\/.task\/freecinc_d9da621f.cert.pem
taskd.key=\/usr\/local\/google\/home\/barakmich\/.task\/freecinc_d9da621f.key.pem
taskd.ca=\/usr\/local\/google\/home\/barakmich\/.task\/freecinc_d9da621f.ca.pem
taskd.certificate=\/home\/barak\/.task\/freecinc_d9da621f.cert.pem
taskd.key=\/home\/barak\/.task\/freecinc_d9da621f.key.pem
taskd.ca=\/home\/barak\/.task\/freecinc_d9da621f.ca.pem

4
.vimrc
View file

@ -495,6 +495,8 @@ nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap <C-h> <C-w>h
"nnoremap <C-j> <C-w>w
"nnoremap <C-k> <C-w>W
inoremap <C-j> <C-w>j
inoremap <C-k> <C-w>k
inoremap <C-l> <C-w>l
@ -511,6 +513,8 @@ inoremap jj <Esc>
" Leader key functions
" See quickfix.
nnoremap <Leader>ff :QFix<CR>
" See quickfix.
nnoremap <Leader>ss :SyntasticSetLoclist<CR>
" Next quickfix.
nnoremap <Leader>fn :cnext<CR>
" Prev quickfix.

11
bin/benchx.awk Normal file
View file

@ -0,0 +1,11 @@
{
x = substr($4, 1,1)
v = substr($4, 2, length($4) - 2)
if (x == "+") {
printf "%s\t%s%.2fx\n", $0, x, (100 + v) / 100;
} else if (x == "-") {
printf "%s\t%s%.2fx\n", $0, x, (100 / (100 - v));
} else {
printf "%s\t%s\n", $0, "mult"
}
}