For When You Can't Have The Real Thing
[ start | index | login ]
start > dave > dotfiles


Created by dave. Last edited by dave, 2 years and 125 days ago. Viewed 3,707 times. #20
[diff] [history] [edit] [rdf]
.inputrc (90)
.screenrc (138)
.vimrc (1279)
_vimrc (2150)

Useful stuff for Dotfiles

More-up-to-date stuff is on >>github.


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
# set 'ls' colors
if [ -f /etc/DIR_COLORS ]; then
    eval `dircolors --sh /etc/DIR_COLORS`
    alias ls="/bin/ls -F --color=auto"
# Display alias
disp () {
        if [ $# == 1 ]; then
                export DISPLAY
        /bin/echo $DISPLAY
alias nodisp="export DISPLAY="
# Terminal
alias vt100='export TERM=vt100'
# Dig
alias digs='dig +short'
# Today, in ISO format
alias today='export TODAY=`date +%Y-%m-%d` ; echo $TODAY'
# For Suns: some suns don't like "linux" or the screen terminal types
if [ "$TERM" == "linux" ] ; then
        export TERM=vt100
if [ "$TERM" == "screen-w" ] ; then
        export TERM=vt100
if [ "$TERM" == "screen" ] ; then
        export TERM=vt100
# Smart History Completion
(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
" easier colorscheme to read
colorscheme evening
" 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

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.

# Status line
hardstatus alwayslastline
hardstatus string '%H %{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
# scrollback depth
defscrollback 10000
# detach on hangup
autodetach on
# no startup msg
startup_message off
# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E>
# (This fixes the "Aborted because of window size change" konsole symptoms found
#  in bug #134198)
# (In practice, this stops some terminals from resizing to 80 columns when screen starts or re-attaches)
termcapinfo xterm* 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'

(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
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt