Permalink
Browse files

Initial set based on Mac

  • Loading branch information...
0 parents commit 3c9ec3e776468c5bafbcf4323acb5ef0b4772560 @nerab committed Apr 30, 2012
Showing with 176 additions and 0 deletions.
  1. +47 −0 .bashrc
  2. +1 −0 .gemrc
  3. 0 .gitignore
  4. +20 −0 .rake-completion.bash
  5. +3 −0 .rdebugrc
  6. +34 −0 .tmux.conf
  7. +65 −0 .vimrc
  8. +6 −0 bin/jj
47 .bashrc
@@ -0,0 +1,47 @@
+source `brew --prefix`/Library/Contributions/brew_bash_completion.sh
+export VISUAL=vi
+GEM_EDITOR='vi'
+
+source ~/.git-completion.bash
+source ~/.rake-completion.bash
+PATH=~/Dropbox/bin:$PATH
+
+alias t=task
+
+mail2kindle () {
+ echo "${1}" | mutt -s "${1}" -a "${1}" -- Steffen.Uhlig@free.kindle.com
+}
+
+# Load RVM into a shell session *as a function*
+[[ -s "/Users/suhlig/.rvm/scripts/rvm" ]] && source "/Users/suhlig/.rvm/scripts/rvm"
+
+# http://www.cyberciti.biz/faq/bsd-appleosx-linux-bash-shell-run-command-n-times/#comment-60204
+# Call like
+# repeat 3 echo Hello World
+repeat() { local i n; n=$1; shift; for ((i=1; i<=n; i++)); do "$@"; done; }
+
+# teach git about GitHub
+eval "$(hub alias -s)"
+
+# open ETN.fm with QuickTime
+alias etn.fm="open -a '/Applications/QuickTime Player.app' http://etn.fm/playlists/etn1beta.m3u"
+
+# keep huge history
+export HISTSIZE=1000000
+export HISTFILESIZE=1000000000
+
+# TMUX
+if which tmux 2>&1 >/dev/null; then
+ # if no session is started, start a new session
+ test -z ${TMUX} && tmux
+
+ # when quitting tmux, try to attach
+ while test -z ${TMUX}; do
+ tmux attach || break
+ done
+fi
+
+source "`brew --prefix grc`/etc/grc.bashrc"
+
+
+PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
1 .gemrc
@@ -0,0 +1 @@
+gem: --no-ri --no-rdoc
No changes.
@@ -0,0 +1,20 @@
+# from https://github.com/jpalardy/dotfiles/blob/master/bash/completion/rake.sh
+
+export COMP_WORDBREAKS=${COMP_WORDBREAKS/\:/}
+
+_check_rakefile() {
+ if [ ! -e Rakefile ]; then
+ return
+ fi
+
+ local cache_file=".cache_rake_t"
+
+ if [ ! -e "$cache_file" ]; then
+ rake -T | awk '/^rake / {print $2}' > $cache_file
+ fi
+
+ local tasks=$(cat $cache_file)
+ COMPREPLY=( $(compgen -W "${tasks}" -- $2) )
+}
+
+complete -F _check_rakefile -o default rake
@@ -0,0 +1,3 @@
+set autolist
+set autoeval
+set autoreload
@@ -0,0 +1,34 @@
+# C-b is not acceptable -- Vim uses it
+set-option -g prefix C-t
+bind-key C-t last-window
+#
+# # Start numbering at 1
+# set -g base-index 1
+#
+# # Allows for faster key repetition
+# set -s escape-time 0
+#
+# # Set status bar
+# set -g status-bg black
+# set -g status-fg white
+# set -g status-left ""
+# set -g status-right "#[fg=green]#H"
+#
+# # Rather than constraining window size to the maximum size of any client
+# # connected to the *session*, constrain window size to the maximum size of any
+# # client connected to *that window*. Much more reasonable.
+# setw -g aggressive-resize on
+#
+# # Allows us to use C-a a <command> to send commands to a TMUX session inside
+# # another TMUX session
+# bind-key a send-prefix
+#
+# # Activity monitoring
+# #setw -g monitor-activity on
+# #set -g visual-activity on
+#
+# # Example of using a shell command in the status line
+# #set -g status-right "#[fg=yellow]#(uptime | cut -d ',' -f 2-)"
+#
+# # Highlight active window
+set-window-option -g window-status-current-bg red
65 .vimrc
@@ -0,0 +1,65 @@
+" http://stevelosh.com/blog/2010/09/coming-home-to-vim/
+filetype off
+call pathogen#runtime_append_all_bundles()
+filetype plugin indent on
+set nocompatible
+set modelines=0
+set tabstop=2
+set shiftwidth=2
+set softtabstop=2
+set expandtab
+set encoding=utf-8
+set scrolloff=3
+set autoindent
+set showmode
+set showcmd
+set hidden
+set wildmenu
+set wildmode=list:longest
+set visualbell
+set cursorline
+set ttyfast
+set ruler
+set backspace=indent,eol,start
+set laststatus=2
+" set relativenumber
+" set undofile
+let mapleader = ","
+nnoremap / /\v
+vnoremap / /\v
+set ignorecase
+set smartcase
+set gdefault
+set incsearch
+set showmatch
+set hlsearch
+nnoremap <leader><space> :noh<cr>
+nnoremap <tab> %
+vnoremap <tab> %
+set wrap
+set textwidth=79
+set formatoptions=qrn1
+" set colorcolumn=85
+set list
+set listchars=tab:▸\ ,eol
+nnoremap <up> <nop>
+nnoremap <down> <nop>
+nnoremap <left> <nop>
+nnoremap <right> <nop>
+inoremap <up> <nop>
+inoremap <down> <nop>
+inoremap <left> <nop>
+inoremap <right> <nop>
+nnoremap j gj
+nnoremap k gk
+inoremap <F1> <ESC>
+nnoremap <F1> <ESC>
+vnoremap <F1> <ESC>
+nnoremap ; :
+" au FocusLost * :wa
+
+" personal
+set number
+syntax enable
+set background=dark
+colorscheme solarized
6 bin/jj
@@ -0,0 +1,6 @@
+#!/usr/bin/env ruby
+# jj - pretty print JSON from file or standard input
+
+require 'json'
+
+jj JSON[ARGF.read]

0 comments on commit 3c9ec3e

Please sign in to comment.