From c5a4e6ee773cd226ce10af24e42d648696a42905 Mon Sep 17 00:00:00 2001 From: David Kerkeslager Date: Tue, 6 Jul 2010 00:30:09 -0400 Subject: [PATCH] Adding my existing configuration files. --- .bashrc | 69 ++++++++++++++++++++++++++++++++++++++++++ .screenrc | 61 ++++++++++++++++++++++++++++++++++++++ .vimrc | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 219 insertions(+) create mode 100644 .bashrc create mode 100644 .screenrc create mode 100644 .vimrc diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..0d83d1f --- /dev/null +++ b/.bashrc @@ -0,0 +1,69 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. + +# 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 the prompt +PS1='\w\$ ' + +# 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 + +alias clang='~/Programs/clang2.6/bin/clang -Wall -std=c99 -lncurses' +alias emacs='emacs -nw' +alias gcc='gcc -Wall -std=c99 -lncurses' +alias serve='python -m SimpleHTTPServer 8080' + +export SVN_EDITOR=vim + +# 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 + +# Add the ~/bin directory to the path. This allows you to install simple +# binaries by simply moving them into ~/bin. +if [ -d $HOME/bin ]; then + PATH="$HOME/bin:$PATH" + export PATH +fi + +# Run a machine-specific bashrc (if it exists). +if [ -f $HOME/.bashrc_local ]; then + source $HOME/.bashrc_local +fi + +# Automatically open screen. +# The if statement prevents it from recursing (since screen opens bash). +if [ $TERM != screen ]; then + screen +fi diff --git a/.screenrc b/.screenrc new file mode 100644 index 0000000..c833ba6 --- /dev/null +++ b/.screenrc @@ -0,0 +1,61 @@ +# ------------------------------------------------------------------------------ +# SCREEN SETTINGS +# ------------------------------------------------------------------------------ + +startup_message off # Turn off the introductory startup message. +#autodetach off # Close associated programs when screen closes. +defscrollback 1024 # Define a longer scrollback. +vbell off # Turn off screen flashing for bell. + +# ------------------------------------------------------------------------------ +# SCREEN KEYBINDINGS +# ------------------------------------------------------------------------------ + +escape ^]] # Use +] instead of +a for screen commands. + +# Remove some stupid / dangerous key bindings +bind ^k +bind L +bind ^\ + +# Make them better +bind \\ quit +bind K kill + +# ------------------------------------------------------------------------------ +# TERMINAL SETTINGS +# ------------------------------------------------------------------------------ + +# The vt100 description does not mention "dl". *sigh* +termcapinfo vt100 dl=5\E[M + +# Set the hardstatus prop on gui terms to set the titlebar/icon title +termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007 + +# List the open screens, with the current screen highlighted. +# Also list the time and date. +hardstatus on +hardstatus alwayslastline "%{= kW} %= %?%-w%? (%{W}%n %t%?(%u)%?) %?%+w%? %=" + +# set these terminals up to be 'optimal' instead of vt100 +termcapinfo xterm*|linux*|rxvt*|Eterm* OP + +# 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) +termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' + +# Enable non-blocking mode to better cope with flaky ssh connections. +defnonblock 5 + +# ------------------------------------------------------------------------------ +# STARTUP SCREENS +# ------------------------------------------------------------------------------ +screen -t ssh bash +screen -t bash bash +screen -t editor bash +screen -t man bash +screen -t batch bash +screen -t other bash +select 2 +select 1 diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..8f2bf64 --- /dev/null +++ b/.vimrc @@ -0,0 +1,89 @@ +" Don't imitate vi. +set nocompatible + +" Show line numbers. +set number +set numberwidth=4 + +" Scroll five lines ahead of cursor. +set scrolloff=5 + +" Set up autoindentation. +set smartindent +filetype indent on + +" Set tabs to width 4. +set softtabstop=4 +set tabstop=4 +set shiftwidth=4 +set noexpandtab + +" Search as you type. +set incsearch + +" Display command and location status. +set ruler +set showcmd + +" Multiple windows are equally sized and open in reading order. +set equalalways +set splitbelow splitright + +" Line wrapping off +set nowrap + +" Reset colors to a clean state. +if !has('gui_running') + set t_Co=8 t_md= +endif + +" Enable syntax "highlighting. +syntax enable + +" Force vim to sync syntax "highlighting from the beginning of the file. +syn sync fromstart + +" Set the color scheme. +hi Normal cterm=none ctermfg=white ctermbg=black " Plain text. + +hi Comment cterm=none ctermfg=darkblue ctermbg=black " Comment: // Hello, world + +hi Constant cterm=none ctermfg=blue ctermbg=black " Constant: +hi String cterm=none ctermfg=blue ctermbg=black " String: "Hello, world" +hi Character cterm=none ctermfg=blue ctermbg=black " Character: 'a' +hi Number cterm=none ctermfg=blue ctermbg=black " Number: 234, 0xff +hi Boolean cterm=none ctermfg=blue ctermbg=black " Boolean: TRUE, false +hi Float cterm=none ctermfg=blue ctermbg=black " Float: 2.3e10 + +hi Identifier cterm=none ctermfg=white ctermbg=black " Identifier: foo +hi Function cterm=none ctermfg=white ctermbg=black " Function/method: foo() + +hi Statement cterm=none ctermfg=brown ctermbg=black " Statement: +hi Conditional cterm=none ctermfg=brown ctermbg=black " Conditional: if, then, else, endif, switch +hi Repeat cterm=none ctermfg=brown ctermbg=black " Repeat: for, do, while +hi Label cterm=none ctermfg=brown ctermbg=black " Label: case, default +hi Operator cterm=none ctermfg=brown ctermbg=black " Operator: sizeof, +, * +hi Keyword cterm=none ctermfg=brown ctermbg=black " Keyword: register, const +hi Exception cterm=none ctermfg=brown ctermbg=black " Exception: try, catch, throw + +hi PreProc cterm=none ctermfg=darkred ctermbg=black " Preprocessor directives: +hi Include cterm=none ctermfg=darkred ctermbg=black " #include +hi Define cterm=none ctermfg=darkred ctermbg=black " #define +hi PreCondit cterm=none ctermfg=darkred ctermbg=black " #if, #else, #endif + +hi Type cterm=none ctermfg=darkgreen ctermbg=black " Types: int, long, char +hi StorageClass cterm=none ctermfg=darkgreen ctermbg=black " Storage modifiers: static, register, volatile +hi Structure cterm=none ctermfg=darkgreen ctermbg=black " User-defined types: struct, union, enum +hi Typedef cterm=none ctermfg=darkgreen ctermbg=black " typedef + +hi Special cterm=none ctermfg=magenta ctermbg=black " Special symbols +hi SpecialChar cterm=none ctermfg=magenta ctermbg=black " Special characters in a constant +hi Delimiter cterm=none ctermfg=magenta ctermbg=black " Character that is highlighted +hi SpecialComment cterm=none ctermfg=magenta ctermbg=black " Special things inside a comment +hi Debug cterm=none ctermfg=magenta ctermbg=black " Debugging statements. + +hi Underlined cterm=underline ctermfg=magenta ctermbg=black " Underlined stuff (HTML links) + +hi Error cterm=none ctermfg=red ctermbg=black " Erroneous content + +hi Todo cterm=bold ctermfg=red ctermbg=black " TODO, FIXME, XXX comments. -- 2.20.1