Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

various updates to emacs config, adds new slate config

  • Loading branch information...
commit 66297255d4f685eb09b3618dade88fbdd72d39ae 1 parent 6f084c2
Dominick LoBraico authored
1  bootstrap_starter.sh
View
@@ -15,6 +15,7 @@ git submodule init
git submodule update
ln -s $HOME/.dotfiles/vimrc $HOME/.vimrc
ln -s $HOME/.dotfiles/vim $HOME/.vim
+ln -s $HOME/.dotfiles/slate $HOME/.slate
ln -s $HOME/.dotfiles/emacs.d $HOME/.emacs.d
mv $HOME/.zshrc $HOME/.zshrc_original
ln -s $HOME/.dotfiles/zshrc $HOME/.zshrc
46 emacs.d/config/pygatea-auctex.el
View
@@ -0,0 +1,46 @@
+(setq TeX-engine 'xetex)
+(setq TeX-command-BibTeX 'Biber)
+
+; FIXME
+
+(add-hook 'LaTeX-mode-hook
+ (lambda ()
+ 'TeX-source-correlate-mode
+ (setq TeX-source-correlate-method 'synctex)
+ (add-to-list 'TeX-command-list '("Biber" "biber %s.bcf" TeX-run-BibTeX nil t))))
+
+
+(add-hook 'LaTeX-mode-hook
+ (lambda()
+ (add-to-list 'TeX-expand-list
+ '("%q" skim-make-url))))
+
+(defun skim-make-url () (concat
+ (TeX-current-line)
+ " \""
+ (expand-file-name (funcall file (TeX-output-extension) t)
+ (file-name-directory (TeX-master-file)))
+ "\" \""
+ (buffer-file-name)
+ "\""))
+
+(setq TeX-view-program-list
+ '(("Skim" "/Applications/Skim.app/Contents/SharedSupport/displayline %q")))
+
+(setq TeX-view-program-selection '((output-pdf "Skim")))
+
+(defun latex-word-count ()
+ (interactive)
+ (shell-command (concat "/usr/texbin/texcount "
+ "\""
+ (buffer-file-name)
+ "\"")))
+
+(add-hook 'LaTeX-mode-hook (lambda ()
+ (define-key LaTeX-mode-map (kbd "<f6>") 'latex-word-count)
+ (key-chord-define LaTeX-mode-map ",l" 'TeX-command-master)
+ ))
+
+
+
+(provide 'pygatea-auctex)
14 emacs.d/config/pygatea-autocomplete.el
View
@@ -2,7 +2,7 @@
;; from https://gist.github.com/215930
(setq hippie-expand-try-functions-list
- '(yas/hippie-try-expand
+ '(;yas/hippie-try-expand
try-complete-file-name-partially
try-expand-all-abbrevs
try-expand-dabbrev
@@ -11,13 +11,9 @@
try-complete-lisp-symbol-partially
try-complete-lisp-symbol))
-(require 'yasnippet)
-(setq yas/root-directory "~/.emacs.d/snippets")
-(yas/load-directory yas/root-directory)
-
;; Helps when debugging which try-function expanded
(setq hippie-expand-verbose t)
-(yas/global-mode 1)
+;(yas/global-mode 1)
(defvar smart-tab-using-hippie-expand t
"turn this on if you want to use hippie-expand completion.")
@@ -57,10 +53,4 @@
(define-key read-expression-map [(tab)] 'hippie-expand)
(define-key read-expression-map [(shift tab)] 'unexpand)
-;; Replace yasnippets's TAB
-(add-hook 'yas/minor-mode-hook
- (lambda () (define-key yas/minor-mode-map
- (kbd "TAB") 'smart-tab))) ; was yas/expand
-
-
(provide 'pygatea-autocomplete)
8 emacs.d/config/pygatea-editor.el
View
@@ -40,7 +40,7 @@
try-complete-lisp-symbol))
;; smart pairing for all
-(electric-pair-mode t)
+(autopair-global-mode t)
;; meaningful names for buffers with the same name
(require 'uniquify)
@@ -160,9 +160,9 @@
(add-hook 'text-mode-hook 'turn-on-auto-fill)
;; load yasnippet
-(require 'yasnippet)
-(add-to-list 'yas/snippet-dirs pygatea-snippets-dir)
-(yas/global-mode 1)
+;(require 'yasnippet)
+;(add-to-list 'yas/snippet-dirs pygatea-snippets-dir)
+;(yas/global-mode 1)
;; projectile is a project management mode
(require 'projectile)
42 emacs.d/config/pygatea-evil.el
View
@@ -16,14 +16,13 @@
(require 'evil-leader)
(require 'evil)
-(define-key evil-insert-state-map "j" (lambda () (interactive) (maybe-exit "j")))
-(define-key evil-insert-state-map "J" (lambda () (interactive) (maybe-exit "J")))
+(define-key evil-insert-state-map "j" #'maybe-exit)
-(evil-define-command maybe-exit (first-char)
+(evil-define-command maybe-exit ()
:repeat change
(interactive)
(let ((modified (buffer-modified-p)))
- (insert first-char)
+ (insert "j")
(let ((evt (read-event (format "Insert %c to exit insert state" ?k)
nil 0.5)))
(cond
@@ -58,22 +57,23 @@
(evil-mode 1)
(evil-leader/set-key
- "k" 'kill-current-buffer
- "K" 'kill-buffer-and-window
-
- "n" 'split-window-horizontally
- "m" 'split-window-vertically
-
- "c" 'delete-window
- "N" 'make-frame-command
- "C" 'delete-frame
-
- "f" 'ido-find-file
- "s" 'ido-find-file-in-dir
- "b" 'ido-switch-buffer
-
- "g" 'magit-status
- "h" 'monky-status)
+ "a" 'org-agenda
+ "k" 'kill-current-buffer
+ "K" 'kill-buffer-and-window
+
+ "n" 'split-window-horizontally
+ "m" 'split-window-vertically
+
+ "c" 'delete-window
+ "N" 'make-frame-command
+ "C" 'delete-frame
+
+ "f" 'ido-find-file
+ "s" 'ido-find-file-in-dir
+ "b" 'ido-switch-buffer
+
+ "g" 'magit-status
+ "h" 'monky-status)
;; Org-mode related mappings are in ./pygatea-org.el
@@ -95,5 +95,7 @@
(define-key evil-normal-state-map "z=" 'ispell-word)
+(key-chord-mode 1)
+(key-chord-define-global "hl" 'evil-normal-state) ; super ESC!
(provide 'pygatea-evil)
53 emacs.d/config/pygatea-org.el
View
@@ -7,33 +7,58 @@
(setq org-todo-keywords
'((sequence "TODO" "STARTED" "WAITING" "|" "DONE" "CANCELED" "DELEGATED")))
-(setq org-log-done '(state))
+(defun pygatea-evil-org-insert-heading ()
+ (interactive)
+ (end-of-line)
+ (org-insert-heading)
+ (evil-append nil))
+
+;; (defun always-insert-item ()
+;; (interactive)
+;; (if (not (org-in-item-p))
+;; (insert "\n- ")
+;; (org-insert-item)))
+
+
+;; (defun pygatea-evil-always-insert-item ()
+;; (interactive)
+;; (end-of-line)
+;; (always-insert-item)
+;; (evil-append nil))
(evil-define-key 'normal org-mode-map
(kbd "<tab>") 'org-cycle
+ "-" 'org-cycle-list-bullet
+ "o" 'pygatea-evil-org-insert-heading
"gh" 'outline-up-heading
"gj" 'org-forward-same-level
"gk" 'org-backward-same-level
"gl" 'outline-next-visible-heading
"H" 'org-beginning-of-line
"L" 'org-end-of-line
- "t" 'org-todo
+ "T" 'org-todo
"$" 'org-end-of-line
"^" 'org-beginning-of-line
"-" 'org-ctrl-c-minus
"<" 'org-metaleft
">" 'org-metaright
- ",d" 'org-deadline)
-
-(mapcar (lambda (state)
- (evil-define-key state org-mode-map
- (kbd "M-l") 'org-metaright
- (kbd "M-h") 'org-metaleft
- (kbd "M-k") 'org-metaup
- (kbd "M-j") 'org-metadown
- (kbd "M-L") 'org-shiftmetaright
- (kbd "M-H") 'org-shiftmetaleft
- (kbd "M-K") 'org-shiftmetaup
- (kbd "M-J") 'org-shiftmetadown)) '(normal insert))
+ ",d" 'org-deadline
+ "L" 'org-shiftright
+ "H" 'org-shiftleft
+ "K" 'org-shiftup
+ "J" 'org-shiftdown
+ (kbd "M-l") 'org-metaright
+ (kbd "M-h") 'org-metaleft
+ (kbd "M-k") 'org-metaup
+ (kbd "M-j") 'org-metadown
+ (kbd "M-L") 'org-shiftmetaright
+ (kbd "M-H") 'org-shiftmetaleft
+ (kbd "M-K") 'org-shiftmetaup
+ (kbd "M-J") 'org-shiftmetadown)
+
+(add-hook 'org-agenda-mode-hook
+ (lambda ()
+ (define-key org-agenda-mode-map "j" 'evil-next-line)
+ (define-key org-agenda-mode-map "k" 'evil-previous-line)))
(provide 'pygatea-org)
3  emacs.d/config/pygatea-packages.el
View
@@ -12,6 +12,7 @@
(defvar pygatea-packages
'(ack-and-a-half
auctex
+ autopair
browse-kill-ring
color-theme-sanityinc-tomorrow
color-theme-sanityinc-solarized
@@ -35,6 +36,7 @@
haskell-mode
helm
helm-projectile
+ key-chord
magit
;;gist
;;magithub
@@ -51,7 +53,6 @@
tuareg
undo-tree
volatile-highlights
- yasnippet
zenburn-theme )
"A list of packages to ensure are installed at launch.")
5 emacs.d/init.el
View
@@ -8,8 +8,6 @@
"The root dir of my Emacs configuration.")
(defvar pygatea-modules-dir (concat pygatea-dir "config/")
"This directory contains all of my custom elisp. Heavily based off Emacs Prelude (at least for now).")
-(defvar pygatea-snippets-dir (concat pygatea-dir "snippets/")
- "This directory contains snippets for yasnippets.")
(defvar pygatea-personal-dir (concat pygatea-dir "elisp/")
"This contains customizations and larger programs not yet organized into the config directory.")
(defvar pygatea-vendor-dir (concat pygatea-dir "vendor/")
@@ -20,8 +18,6 @@ ELPA (or MELPA).")
(unless (file-exists-p pygatea-savefile-dir)
(make-directory pygatea-savefile-dir))
-(unless (file-exists-p pygatea-snippets-dir)
- (make-directory pygatea-snippets-dir))
(add-to-list 'load-path pygatea-modules-dir)
(add-to-list 'load-path pygatea-vendor-dir)
@@ -38,6 +34,7 @@ ELPA (or MELPA).")
(require 'pygatea-core)
(require 'pygatea-evil)
(require 'pygatea-org)
+(require 'pygatea-auctex)
(require 'pygatea-editor)
(require 'pygatea-autocomplete)
(require 'pygatea-global-keybindings)
72 slate
View
@@ -0,0 +1,72 @@
+# Config
+config windowHintsFontSize 100
+config nudgePercentOf screenSize
+config resizePercentOf screenSize
+# config defaultToCurrentScreen true
+config windowHintsTopLeftX (windowSizeX/2)-(windowHintsWidth/2)
+config windowHintsTopLeftY (windowSizeY/2)-(windowHintsHeight/2)
+
+# General aliases
+alias sox screenOriginX
+alias soy screenOriginY
+alias ssx screenSizeX
+alias ssy screenSizeY
+
+# Position aliases
+alias centered ${sox}+${ssx}/8;${soy}+${ssy}/8 ${ssx}/8*6;${ssy}/8*6
+alias fullscreen ${sox};${soy} ${ssx};${ssy}
+alias leftHalf ${sox};${soy} ${ssx}/2;${ssy}
+alias bottomHalf ${sox};${soy}+${ssy}/2 ${ssx};${ssy}/2
+alias topHalf ${sox};${soy} ${ssx};${ssy}/2
+alias rightHalf ${sox}+${ssx}/2;${soy} ${ssx}/2;${ssy}
+alias topLeftQuarter ${sox};${soy} ${ssx}/2;${ssy}/2
+alias topRightQuarter ${sox}+${ssx}/2;${soy} ${ssx}/2;${ssy}/2
+alias bottomLeftQuarter ${sox};${soy}+${ssy}/2 ${ssx}/2;${ssy}/2
+alias bottomRightQuarter ${sox}+${ssx}/2;${soy}+${ssy}/2 ${ssx}/2;${ssy}/2
+
+# Application aliases
+#alias adiumContacts3 move ${sox};${soy} ${ssx}/5;${ssy}/3*2 0
+#alias adiumChat3 move ${sox}+${ssx}/5;${soy}+${ssy}/3 ${ssx}/5*4;${ssy}/3 0
+
+# 1 monitor layout
+layout oneScreen 'Safari' move ${fullscreen}
+layout twoScreen 'MacVim' move ${rightHalf}
+layout twoScreen 'Emacs' move ${rightHalf}
+layout twoScreen 'iTerm' move ${leftHalf}
+layout twoScreen 'Terminal' move ${leftHalf}
+
+# 2 monitor layout
+layout twoScreen 'Safari' move ${sox};${soy} ${ssx}/2;${ssy} 0
+layout twoScreen 'MacVim' move ${ssx}/2;${soy} ${ssx}/2;${ssy} 0
+layout twoScreen 'Emacs' move ${ssx}/2;${soy} ${ssx}/2;${ssy} 0
+layout twoScreen 'iTerm' move ${sox};${soy} ${ssx};${ssy} 1
+layout twoScreen 'Terminal' move ${sox};${soy} ${ssx};${ssy} 1
+
+# Bindings
+bind g:cmd;ctrl move ${centered}
+bind o:cmd;ctrl move ${fullscreen}
+bind h:cmd;ctrl move ${leftHalf}
+bind j:cmd;ctrl move ${bottomHalf}
+bind k:cmd;ctrl move ${topHalf}
+bind l:cmd;ctrl move ${rightHalf}
+bind u:cmd;ctrl move ${topLeftQuarter}
+bind i:cmd;ctrl move ${topRightQuarter}
+bind n:cmd;ctrl move ${bottomLeftQuarter}
+bind m:cmd;ctrl move ${bottomRightQuarter}
+
+bind ;:cmd;ctrl throw previous
+bind /:cmd;ctrl hint ASDFJKLGH
+bind 1:ctrl layout oneScreen
+bind 2:ctrl layout twoScreen
+
+bind right:cmd;ctrl resize +10% +0
+bind left:cmd;ctrl resize -10% +0
+bind up:cmd;ctrl resize +0 -10%
+bind down:cmd;ctrl resize +0 +10%
+
+bind right:ctrl;alt nudge +10% +0
+bind left:ctrl;alt nudge -10% +0
+bind up:ctrl;alt nudge +0 -10%
+bind down:ctrl;alt nudge +0 +10%
+
+#bind tab:cmd switch
48 slate/default.slate
View
@@ -1,48 +0,0 @@
-# This is the default .slate file.
-# If no ~/.slate file exists this is the file that will be used.
-
-config defaultToCurrentScreen true
-config nudgePercentOf screenSize
-config resizePercentOf screenSize
-
-# Resize Bindings
-bind l:alt resize +10% +0
-bind h:alt resize -10% +0
-bind k:alt resize +0 -10%
-bind j:alt resize +0 +10%
-bind l:ctrl;alt resize -10% +0 bottom-right
-bind h:ctrl;alt resize +10% +0 bottom-right
-bind k:ctrl;alt resize +0 +10% bottom-right
-bind j:ctrl;alt resize +0 -10% bottom-right
-
-# Push Bindings
-bind l:ctrl;cmd push right bar-resize:screenSizeX/2
-bind h:ctrl;cmd push left bar-resize:screenSizeX/2
-bind k:ctrl;cmd push up bar-resize:screenSizeY/2
-bind j:ctrl;cmd push down bar-resize:screenSizeY/2
-
-# Nudge Bindings
-bind l:shift;alt nudge +10% +0
-bind h:shift;alt nudge -10% +0
-bind k:shift;alt nudge +0 -10%
-bind j:shift;alt nudge +0 +10%
-
-# Throw Bindings
-bind 1:ctrl;alt throw 0 resize
-bind 2:ctrl;alt throw 1 resize
-bind 3:ctrl;alt throw 2 resize
-bind l:ctrl;alt;cmd throw right resize
-bind h:ctrl;alt;cmd throw left resize
-bind k:ctrl;alt;cmd throw up resize
-bind j:ctrl;alt;cmd throw down resize
-
-# Focus Bindings
-bind l:cmd focus right
-bind h:cmd focus left
-bind k:cmd focus up
-bind j:cmd focus down
-bind k:cmd;alt focus behind
-bind j:cmd;alt focus behind
-
-# Window Hints
-bind esc:cmd hint
2  tmux-powerline
@@ -1 +1 @@
-Subproject commit d2697a7dc859d25c789d11b10d4183699a0d5331
+Subproject commit f7f368cf8ba547a1166bda47c3e7386c5a20ec66
8 tmux.conf
View
@@ -85,7 +85,7 @@ bind r source-file ~/.tmux.conf
bind C-r source-file ~/.tmux.conf
# make pbcopy and pbpaste work on OS X
-#set-option -g default-command "reattach-to-user-namespace -l zsh"
+set-option -g default-command "reattach-to-user-namespace -l zsh"
set -g mode-mouse on
setw -g mouse-select-window on
setw -g mouse-select-pane on
@@ -99,7 +99,7 @@ bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy Escape cancel
-#bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
+bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# status bar
set -g status-fg white
@@ -118,5 +118,5 @@ set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 60
set-option -g status-right-length 90
-set-option -g status-left "#(~/dotfiles/tmux-powerline/status-left.sh)"
-set-option -g status-right "#(~/dotfiles/tmux-powerline/status-right.sh)"
+#set-option -g status-left "#(~/.dotfiles/tmux-powerline/status-left.sh)"
+#set-option -g status-right "#(~/.dotfiles/tmux-powerline/status-right.sh)"
10 zshrc
View
@@ -4,8 +4,9 @@ export ZSHCUSTOM=$HOME/dotfiles/zsh-custom
export ZSH_THEME="jreese"
export DISABLE_AUTO_UPDATE="true"
-plugins=(git mercurial ssh-agent vi-mode bundler compleat debian github vagrant zsh-syntax-highlighting autojump history-substring-search)
+plugins=(git mercurial ssh-agent vi-mode bundler compleat debian github vagrant autojump history-substring-search)
# gnu-utils
+# zsh-syntax-highlighting
source $ZSH/oh-my-zsh.sh
@@ -30,6 +31,7 @@ export SHELL='/bin/zsh'
export PATH=/usr/local/sbin:${PATH}
export PATH=/usr/local/bin:${PATH}
export PATH=${HOME}/bin:${PATH}
+export PATH=${HOME}/.userroot/bin:${PATH}
export MANPATH=${MANPATH:-}:/usr/local/man
export GREP_OPTIONS='--color=auto'
export HISTSIZE=1000
@@ -59,7 +61,7 @@ function zle-line-init zle-keymap-select {
zle -N zle-line-init
zle -N zle-keymap-select
-COMPLETION_WAITING_DOTS=true
+#COMPLETION_WAITING_DOTS=true
# platform specific stuff
if [[ $platform != 'darwin' ]]; then
@@ -79,8 +81,8 @@ if [[ $platform = 'darwin' ]]; then
#export EDITOR='mvim -f -c "au VimLeave * !open -a iTerm"'
export EDITOR="/usr/local/Cellar/macvim/7.3-65/MacVim.app/Contents/MacOS/Vim"
alias vim=${EDITOR}
- alias emacs="/usr/local/Cellar/emacs/24.2/Emacs.app/Contents/MacOS/Emacs -nw"
- alias e="emacsclient"
+ #alias emacs="/usr/local/Cellar/emacs/24.2/bin/emacs"
+ #alias e="emacsclient"
export PYTHONPATH=$PYTHONPATH:/Users/dlobraico/Library/Python/2.7/site-packages # python
export PATH="${HOME}/.cabal/bin:${PATH}" # haskell
export LSCOLORS=gxfxbEaEBxxEhEhBaDaCaD
Please sign in to comment.
Something went wrong with that request. Please try again.