Permalink
Browse files

Merge branch 'master' of github.com:russell/dotfiles

  • Loading branch information...
russell committed Oct 9, 2012
2 parents e34fc99 + eb8a3d3 commit 8308b95b781fa5bb076ed3a78f9f7ef3365ff941
Showing with 142 additions and 55 deletions.
  1. +1 −0 bazaar/bazaar.conf
  2. +7 −0 emacs.d/init-programming.d/lisp.el
  3. +40 −0 emacs.d/init-programming.d/python.el
  4. +53 −38 gitconfig
  5. +29 −10 zsh/arrsim.zsh-theme
  6. +12 −7 zshrc
View
@@ -1,3 +1,4 @@
[DEFAULT]
launchpad_username = russell-sim
email = Russell Sim <russell.sim@gmail.com>
+editor = /usr/bin/emacsclient
@@ -83,3 +83,10 @@
(add-hook 'emacs-lisp-mode-hook
(lambda ()
(elisp-slime-expand-mode t)))
+
+;;
+;; ielm mode
+;;
+(add-hook 'ielm-mode-hook
+ (lambda ()
+ (eldoc-mode)))
@@ -230,3 +230,43 @@
'(lambda ()
(setq indent-region-function #'python-indent-region)
(setq indent-line-function #'python-indent-line-function)))
+
+
+;; Fix window splitting
+
+(defcustom py-max-split-windows 2
+ "When split windows is enabled the maximum windows to allow
+ before reusing other windows."
+ :type 'number
+ :group 'python-mode)
+
+
+(defun py-shell-manage-windows (switch py-split-windows-on-execute-p py-switch-buffers-on-execute-p oldbuf py-buffer-name)
+ (cond (;; split and switch
+ (unless (eq switch 'noswitch)
+ (and py-split-windows-on-execute-p
+ (or (eq switch 'switch)
+ py-switch-buffers-on-execute-p)))
+ (if (< (count-windows) py-max-split-windows)
+ (funcall py-split-windows-on-execute-function)
+ (switch-to-buffer-other-window py-buffer-name)))
+ ;; split, not switch
+ ((and py-split-windows-on-execute-p
+ (or (eq switch 'noswitch)
+ (not (eq switch 'switch))))
+ (if (< (count-windows) py-max-split-windows)
+ (progn
+ (funcall py-split-windows-on-execute-function)
+ (display-buffer py-buffer-name))
+ (display-buffer py-buffer-name 'display-buffer-reuse-window)))
+ ;; no split, switch
+ ((or (eq switch 'switch)
+ (and (not (eq switch 'noswitch))
+ py-switch-buffers-on-execute-p))
+ (pop-to-buffer py-buffer-name)
+ (goto-char (point-max)))
+ ;; no split, no switch
+ ((or (eq switch 'noswitch)
+ (not py-switch-buffers-on-execute-p))
+ (set-buffer oldbuf)
+ (switch-to-buffer (current-buffer)))))
View
@@ -1,57 +1,72 @@
[user]
- name = Russell Sim
- email = russell.sim@gmail.com
+name = Russell Sim
+email = russell.sim@gmail.com
[github]
- user = russell
- token = 4f022ce92bd6715972fcfb67c253c43a
+user = russell
+token = 4f022ce92bd6715972fcfb67c253c43a
[core]
- excludesfile = /home/russell/.gitignore
+excludesfile = /home/russell/.gitignore
[color]
- diff = auto
- branch = auto
- status = auto
- interactive = auto
- ui = auto
+diff = auto
+branch = auto
+status = auto
+interactive = auto
+ui = auto
[diff]
- renames = true
- tool = meld
+renames = true
+tool = meld
[alias]
- st = status
- d = diff
- ci = commit -v
- cia = commit -v -a
- co = checkout
- cp = cherry-pick
- l = log
- ll = log -p
- lt = log trunk..
- llt = log -p trunk..
- lm = log master..
- llm = log -p master..
- b = branch
- cherry-pick-svn = !GIT_EDITOR='sed -i /^git-svn-id:/d' git cherry-pick -e
- spull = !git svn fetch && git svn rebase
- spush = svn dcommit
+
+st = status
+d = diff
+ci = commit -v
+cia = commit -v -a
+co = checkout
+cp = cherry-pick
+l = log
+ll = log -p
+lt = log trunk..
+llt = log -p trunk..
+lm = log master..
+llm = log -p master..
+b = branch -va
+cherry-pick-svn = !GIT_EDITOR='sed -i /^git-svn-id:/d' git cherry-pick -e
+spull = !git svn fetch && git svn rebase
+spush = svn dcommit
+
+# log
+l = log --graph --date=short
+changes = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" --name-status
+
+[merge]
+summary = true
+verbosity = 1
[sendemail]
- aliasesfile = /home/russell/.mutt/alias
- aliasfiletype = mutt
- smtpserver = /usr/bin/msmtp
+aliasesfile = /home/russell/.mutt/alias
+aliasfiletype = mutt
+smtpserver = /usr/bin/msmtp
+
+[format]
+pretty = format:%C(blue)%ad%Creset %C(yellow)%h%C(green)%d%Creset %C(blue)%s %C(magenta) [%an]%Creset
[branch]
- autosetupmerge = true
+autosetupmerge = true
[mergetool "meld"]
- cmd = meld
- trustExitCode = true
+cmd = meld
+trustExitCode = true
+
[gui]
- fontdiff = -family Courier -size 10 -weight normal -slant roman -underline 0 -overstrike 0
- fontui = -family \"DejaVu Sans\" -size 9 -weight normal -slant roman -underline 0 -overstrike 0
+fontdiff = -family Courier -size 10 -weight normal -slant roman -underline 0 -overstrike 0
+fontui = -family \"DejaVu Sans\" -size 9 -weight normal -slant roman -underline 0 -overstrike 0
+
[push]
- default = tracking
+default = tracking
+
[gitreview]
- username = russell-sim
+username = russell-sim
View
@@ -1,7 +1,32 @@
+# -*- mode: sh -*-
+
+autoload -Uz vcs_info
+
+zstyle ':vcs_info:*' enable hg git bzr svn
+zstyle ':vcs_info:*' actionformats '%s' ' on %F{2}%b%F{9} doing %F{1}%a%F{5}'
+zstyle ':vcs_info:*' formats '%s' ' on %F{5}%b%f '
+zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
+function precmd {
+ vcs_info
+ case $TERM in
+ *xterm*)
+ print -Pn "\e]0;%n@%M: %~\a"
+ ;;
+ esac
+}
+
+
function prompt_char {
- git branch >/dev/null 2>/dev/null && echo '±' && return
- hg root >/dev/null 2>/dev/null && echo 'Hg' && return
- echo '$'
+ case ${vcs_info_msg_0_} in
+ git)
+ echo '±';;
+ hg)
+ echo 'Hg';;
+ "")
+ echo "\$";;
+ *)
+ echo "${vcs_info_msg_0_} \$";;
+ esac
}
function virtualenv_info {
@@ -14,12 +39,6 @@ time_disabled="%{$fg[green]%}%*%{$reset_color%}"
time=$time_enabled
PROMPT='
-%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info)
+%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}${vcs_info_msg_1_}
$(virtualenv_info)$(prompt_char) '
RPROMPT='[${time}]'
-
-ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
-ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
-ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
-ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
-ZSH_THEME_GIT_PROMPT_CLEAN=""
View
19 zshrc
@@ -34,15 +34,8 @@ else
autoload -U colors
colors
source ~/.zsh/arrsim.zsh-theme
- source ~/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git/lib/git.zsh
fi
-case $TERM in
- *xterm*)
- precmd () {print -Pn "\e]0;%n@%M: %~\a"}
- ;;
-esac
-
# Example aliases
alias zshconfig="source ~/.zshrc"
@@ -170,6 +163,18 @@ setopt cdablevarS
export GREP_OPTIONS='--color=auto'
export GREP_COLOR='1;32'
+#
+# Less Colors for Man Pages
+#
+
+export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
+export LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold
+export LESS_TERMCAP_me=$'\E[0m' # end mode
+export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
+export LESS_TERMCAP_so=$'\E[38;33;246m' # begin standout-mode - info box
+export LESS_TERMCAP_ue=$'\E[0m' # end underline
+export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline
+
#export PYTHONDONTWRITEBYTECODE=true

0 comments on commit 8308b95

Please sign in to comment.