Skip to content

Commit

Permalink
My environment as I like it.
Browse files Browse the repository at this point in the history
  • Loading branch information
sixohsix authored and Mike Verdone committed Apr 27, 2010
0 parents commit cb49a61
Show file tree
Hide file tree
Showing 17 changed files with 5,803 additions and 0 deletions.
139 changes: 139 additions & 0 deletions .bashrc
@@ -0,0 +1,139 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
# ... or force ignoredups and ignorespace
export HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
screen | xterm-color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi

if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

#if [ -f ~/.bash_aliases ]; then
# . ~/.bash_aliases
#fi

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'

#alias grep='grep --color=auto'
#alias fgrep='fgrep --color=auto'
#alias egrep='egrep --color=auto'
fi

# some more ls aliases
alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'
alias emacs=emacs23
alias ac='deactivate; '
alias n='nosetests -vs'

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi

function vem_activate() {
cmd=`vem activate -q $@`
source $cmd
}

_vem_activate()
{
local cur
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
opts=`vem list -q`

COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
}
complete -F _vem_activate vem_activate

function vemac()
{
deactivate;
vename=`pwd | awk -F / "{print \\$NF}"`
vem_activate $vename
}

function vemfresh()
{
deactivate;
vename=`pwd | awk -F / "{print \\$NF}"`
vem remove $vename
vem create $vename
vem_activate $vename
python setup.py develop
}

export PYTHONSTARTUP=$HOME/.pystartup
export PATH=$HOME/bin:/usr/local/java/jdk/bin:/opt/git/bin/:$PATH
91 changes: 91 additions & 0 deletions .emacs
@@ -0,0 +1,91 @@
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:stipple nil :background "black" :foreground "MediumPurple2" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 122 :width normal :foundry "unknown" :family "Inconsolata"))))
'(cursor ((t (:background "orange"))))
'(mode-line ((t (:background "DarkOrchid3" :foreground "#101010" :box (:line-width -1 :color "grey")))))
'(mode-line-inactive ((t (:inherit mode-line :background "MediumPurple4" :foreground "grey80" :box -1 :weight light)))))

(add-to-list 'load-path "~/.emacs-lib")

;; No Bullshit mode.
(setq inhibit-splash-screen t)
(menu-bar-mode 0)
(tool-bar-mode 0)
(scroll-bar-mode 0)

(require 'uniquify)
(setq uniquify-buffer-name-style 'reverse)
(setq uniquify-separator "|")
(setq uniquify-after-kill-buffer-p t)
(setq uniquify-ignore-buffers-re "^\\*")

(require 'ido)
(ido-mode t)

(require 'column-marker)
(add-hook 'python-mode-hook (lambda () (interactive) (column-marker-1 80)))

(global-set-key
(read-kbd-macro "C-x p") "import pdb; pdb.set_trace() # --miv DEBUG")
(global-set-key
(read-kbd-macro "s-`") 'next-buffer)
(global-set-key
(read-kbd-macro "s-q") 'buffer-menu)

;; Use F5 to refresh a file.
(defun refresh-file ()
(interactive)
(revert-buffer t t t)
)
(global-set-key [f5] 'refresh-file)

;; Use M-x kill-emacs if you really want to quit.
(global-set-key
(read-kbd-macro "C-x C-c") 'nil)


(defvar iresize-mode-map
(let ((m (make-sparse-keymap)))
(define-key m (kbd "p") 'enlarge-window)
(define-key m (kbd "<up>") 'enlarge-window)
(define-key m (kbd "n") 'shrink-window)
(define-key m (kbd "<down>") 'shrink-window)
(define-key m (kbd "C-c C-c") 'iresize-mode)
(define-key m (kbd "<left>") 'shrink-window-horizontally)
(define-key m (kbd "<right>") 'enlarge-window-horizontally)
m))
(define-minor-mode iresize-mode
:initial-value nil
:lighter " IResize"
:keymap iresize-mode-map
:group 'iresize)
(provide 'iresize)
(global-set-key
(read-kbd-macro "C-x t w") 'iresize-mode)


;; Set up pymacs: emacs-python integration
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)
(eval-after-load "pymacs"
'(add-to-list 'pymacs-load-path ".emacs-lib/python"))


;; Set up pycomplete
(require 'pycomplete)
(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
(autoload 'python-mode "python-mode" "Python editing mode." t)
(setq interpreter-mode-alist(cons '("python" . python-mode)
interpreter-mode-alist))

0 comments on commit cb49a61

Please sign in to comment.