Useful stuff for Dotfiles
Quickly grab:
.bash_profile (and friends)
# A standard-sh prompt
export PS1="[u@h W]# "
# Use bash_completion if installed.
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
# set 'ls' colors
if [ -f /etc/DIR_COLORS ]; then
eval `dircolors --sh /etc/DIR_COLORS`
alias ls="/bin/ls -F --color=auto"
fi
# Display alias
disp () {
if [ $# == 1 ]; then
export DISPLAY
DISPLAY=$1:0.0
fi
/bin/echo $DISPLAY
}
alias nodisp="export DISPLAY="
# Terminal
alias vt100='export TERM=vt100'
# Dig
alias digs='dig +short'
# For Suns: some suns don't like "linux" or the screen terminal types
if [ "$TERM" == "linux" ] ; then
export TERM=vt100
fi
if [ "$TERM" == "screen-w" ] ; then
export TERM=vt100
fi
if [ "$TERM" == "screen" ] ; then
export TERM=vt100
fi
.inputrc
# Smart History Completion
"M-[A":history-search-backward
"M-[B":history-search-forward
.vimrc
(this may not be appropriate for root users due to the tab fanaticism)
" Dave's .vimrc
" History:
" 020522 - updated with comments
"
" set the visual bell to nothing to silence the beeping
set vb t_vb=
" this usually saves more trouble than it causes…
set ai
" Wrap Margin -- we handle our own wrapping thank you sir
set wm=0
" dunno
set redraw
" match bracket pairs
set sm
" Tabs suck. Expand 'tab' chars into the right number of spaces
set expandtab
" ...except when editing Makefiles :)
au BufNewFile ?akefile* set noexpandtab
au BufRead ?akefile* set noexpandtab
" This is the right number of spaces
set tabstop=4
" shift width -- for > and < operations
set sw=4
" This is unix -- pay attention!
set noignorecase
" This is unix -- pay attention!
set nobackup
" Turn on syntax rules if we recognize what is going on
syntax on
" Alias set to wrap text
" Remember to convert ^[ and ^M below into the appropriate control characters
map I o^[kJ070lF r^M
map I J070lF r^M
.screenrc
Option: replace %H with a more descriptive name; ie for each customer I use CUSTOMER-NAME rather than the name of the host I'm on.
hardstatus alwayslastline
hardstatus string '%H %{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}' perltidyrc
(Religious wars to /dev/null please)
-bl # braces on new lines
-pt=2 # tight bracket spacing
-bt=2 # tight bracket spacing
-sbt=2 # tight bracket spacing
-noll # don't outdent long lines
-l=0 # no limit on line length
-nbbc # no blanks before comments
-nbbb # no blanks before blocks