.bash_profile or .bashrc

export PS1='\u@\h \w \$ '
shopt -s checkwinsize

export HISTCONTROL=erasedups
export HISTFILESIZE=10000
export HISTSIZE=10000
shopt -s histappend

# I've found that setting shell window title automatically based on host and/or job name doesn't work for me,
# I prefer to set title manually to arbitrary names usually related to intended purpose
titleprefix() {
    if [ "x$sty_name" != "x" ]; then
        export PROMPT_COMMAND='echo -ne "\033]0;'$1' ${sty_name} ${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
        export PROMPT_COMMAND='echo -ne "\033]0;'$1' ${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
    eval "$PROMPT_COMMAND"  # so it's possible to titleprefix top && top


hardstatus string "%h [screen %n%?: %t%?]"
shell -bash
vbell off
altscreen on


set nocompatible
set ignorecase smartcase incsearch nohlsearch
set hidden
set wrap
set wildmode=longest,list,full
set wildmenu
set display+=lastline
set bs=2

if has('gui_running')
        set guifont=DejaVu_Sans_Mono:h10
        set guioptions-=m
        set guioptions-=T
        set lines=42
        set columns=142
        set bg=dark

nnoremap j gj
nnoremap k gk
vnoremap j gj
vnoremap k gk

syntax on
filetype indent plugin on

au FileType xml setlocal sts=4 ts=4 sw=4 et ai
au FileType xslt setlocal sts=4 ts=4 sw=4 et ai
au FileType python setlocal sts=4 ts=4 sw=4 et ai