Permalink
Browse files

.bash_profile -> .bashrc and more

  • Loading branch information...
1 parent 0fa5ada commit 2ece7f40551e006822d09a57cd0dead4a80849df @puzzlet committed Aug 23, 2012
Showing with 106 additions and 54 deletions.
  1. +0 −50 .bash_profile
  2. +95 −0 .bashrc
  3. +11 −4 .vimrc
View
@@ -1,50 +0,0 @@
-if [ -f ~/.bashrc ]; then
- . ~/.bashrc
-fi
-
-export GIT_PS1_SHOWDIRTYSTATE=1
-export GIT_PS1_SHOWSTASHSTATE=1
-export GIT_PS1_SHOWUNTRACKEDFILES=1
-export GIT_PS1_SHOWUPSTREAM="auto verbose"
-
-function _prompt {
- EXIT_CODE="$?"
-
- BOLD="\[\033[1m\]"
- OFF="\[\033[m\]"
-
- # Debian default
- PS1="${debian_chroot:+($debian_chroot)}\u@\h \w"
-
- # git status
- PS1="$PS1$(__git_ps1) $BOLD\$$OFF "
-
- PS1="$OFF$PS1"
-
- # always at the leftmost column
- PS1="\[\033[G\]$PS1"
-}
-
-PROMPT_COMMAND=_prompt
-
-export PATH=$PATH:$HOME/bin
-export PATH=$PATH:$HOME/devel/emscripten
-
-export EDITOR=vim
-
-# sort ASCII-wise in ls
-export LC_COLLATE="C"
-
-if [ -f ~/devel/_solarized/dircolors-solarized/dircolors.ansi-universal ]; then
- eval `dircolors ~/devel/_solarized/dircolors-solarized/dircolors.ansi-universal`
-fi
-
-. /usr/share/autojump/autojump.sh
-
-# colored grep and less
-alias grep="grep --color=always"
-alias less="less -R"
-
-if [ -f ~/.bash_profile_private ]; then
- . ~/.bash_profile_private
-fi
View
95 .bashrc
@@ -0,0 +1,95 @@
+# 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)"
+
+# 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 grep='grep --color=auto'
+ alias fgrep='fgrep --color=auto'
+ alias egrep='egrep --color=auto'
+
+ alias less="less -R"
+fi
+
+# some more ls aliases
+#alias ll='ls -l'
+#alias la='ls -A'
+#alias l='ls -CF'
+
+# 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
+
+export GIT_PS1_SHOWDIRTYSTATE=1
+export GIT_PS1_SHOWSTASHSTATE=1
+export GIT_PS1_SHOWUNTRACKEDFILES=1
+export GIT_PS1_SHOWUPSTREAM="auto verbose"
+
+function _prompt {
+ if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
+ debian_chroot=$(cat /etc/debian_chroot)
+ fi
+
+ EXIT_CODE="$?"
+
+ BOLD="\[\033[1m\]"
+ OFF="\[\033[m\]"
+
+ # Debian default
+ PS1="${debian_chroot:+($debian_chroot)}\u@\h \w"
+
+ # git status
+ PS1="$PS1$(__git_ps1) $BOLD\$$OFF "
+
+ PS1="$OFF$PS1"
+
+ # always at the leftmost column
+ PS1="\[\033[G\]$PS1"
+}
+
+PROMPT_COMMAND=_prompt
+
+export PATH=$PATH:$HOME/bin
+export PATH=$PATH:$HOME/devel/emscripten
+
+export EDITOR=vim
+
+# sort ASCII-wise in ls
+export LC_COLLATE="C"
+
+if [ -f ~/devel/_solarized/dircolors-solarized/dircolors.ansi-universal ]; then
+ eval `dircolors ~/devel/_solarized/dircolors-solarized/dircolors.ansi-universal`
+fi
+
+. /usr/share/autojump/autojump.sh
+
+# colored grep and less
+alias grep="grep --color=always"
+alias less="less -R"
+
+if [ -f ~/.bash_profile_private ]; then
+ . ~/.bash_profile_private
+fi
View
15 .vimrc
@@ -17,24 +17,31 @@ autocmd BufNewFile,BufRead *.yaml,*.yml so ~/.vim/yaml.vim
filetype plugin indent on
+cmap w!! %!sudo tee > /dev/null %
+
call pathogen#infect()
syntax enable
" solarize
+" TODO: connectbot should NOT use solarized like cygwin
if $TERM != 'cygwin'
let g:solarized_italic=0
- if $COLORTERM == 'gnome-terminal'
+ if has('gui_running')
+ let g:solarized_termcolors=256
+ set t_Co=256
+ elseif $COLORTERM == 'gnome-terminal'
" already has solarized theme
let g:solarized_termcolors=16
set t_Co=16
- elseif has('gui_running')
- let g:solarized_termcolors=256
- set t_Co=256
else
let g:solarized_termcolors=8
set t_Co=8
endif
colorscheme solarized
set background=dark
endif
+
+if filereadable("~/.vimrc_private")
+ source ~/.vimrc_private
+endif

0 comments on commit 2ece7f4

Please sign in to comment.