vimrc

" Set settings
set autoindent
set title
"set notitle
set ruler
set nocompatible
set showcmd
set ts=2
set shiftwidth=2
set expandtab
set shiftround
set smarttab
set tw=72
set backspace=indent,eol,start
set incsearch
set showmatch
set pastetoggle=<F11>
filetype plugin on
syntax on
colors ron
let mapleader=","

" Remember where I last edited a file
set viminfo='10,"100,:20,%,n~/.viminfo
    au BufReadPost * if line("'"") > 0|if line("'"") <= line("$")|exe("norm '"")|else|exe "norm $"|endif|endif

if &term =~ "xterm-debian" || &term =~ "xterm-xfree86" || &term =~ "Eterm"
  set t_Co=16
  set t_Sf=^[[3%dm
  set t_Sb=^[[4%dm
endif
" Settings set

" Map mappings
:inoremap ( ()<ESC>i
:inoremap [ []<ESC>i
:inoremap " ""<ESC>i
:inoremap { {}<ESC>i
:inoremap < <><ESC>i

"map W :!aspell -c -x % " old - vim7 has spellcheck now
map F gqap

" http://vim.sourceforge.net/tips/tip.php?tip_id=465
" make an element out of anything you type with a CR in the middle
inoremap ,,, <esc>diwi<<esc>pa><cr></<esc>pa><esc>kA

" Fix common typos
iab teh the
iab hte the
iab adn and
iab nad and
iab taht that
iab htat that
iab fo of
iab ot to
iab wiht with

set pastetoggle=<F10>

" SmartTab wrapper
function! SmartTab()
  let col = col('.') - 1
  if !col || getline('.')[col - 1] !~ 'k'
    return "<tab>"
  else
    return "<c-p>"
  endif
endfunction

" turn on SmartTabs
inoremap <tab> <c-r>=SmartTab()<cr>

" Turn on the spellcheck
setlocal spell spelllang=en_us
set spellfile=~/.vimspell.utf8.add

" Mappings mapped

" Language-specific skeleton files
" Perl
autocmd BufNewFile *.pl 0r ~/.vim/skel/skel.pl
" HTML
autocmd BufNewFile *.html 0r ~/.vim/skel/skel.html
" Python
autocmd BufNewFile *.py 0r ~/.vim/skel/skel.py

vimrc on Windoze

" This is for vim 7.0 - which has several great improvements.

set nocompatible
"source $VIMRUNTIME/vimrc_example.vim
"source $VIMRUNTIME/mswin.vim
"behave mswin

set diffexpr=MyDiff()
function MyDiff()
  let opt = '-a --binary '
  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  let arg1 = v:fname_in
  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
  let arg2 = v:fname_new
  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
  let arg3 = v:fname_out
  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
  let eq = ''
  if $VIMRUNTIME =~ ' '
    if &sh =~ '<cmd'
      let cmd = '""' . $VIMRUNTIME . 'diff"'
      let eq = '"'
    else
      let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . 'diff"'
    endif
  else
    let cmd = $VIMRUNTIME . 'diff'
  endif
  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction

" It takes a lot of doing to get vim (which is really gvim)
" to behave properly on Windoze, but I've got something that
" works a bit.  I have to turn auto-indenting off because it
" constantly screws up, but it's better than notepad.

colors pablo
set guifont=Lucida_Console:h10:cANSI
set nocompatible
set backspace=indent,eol,start
set ruler
set nocompatible
set showcmd
set ts=2
set shiftwidth=2
set expandtab
set shiftround
set smarttab
set tw=72
set hlsearch
set lines=56
set autoindent

set incsearch
filetype plugin on
syntax on

:inoremap ( ()<Esc>i
:inoremap [ []<Esc>i
:inoremap " ""<Esc>i
:inoremap { {}<Esc>i
:inoremap < <><Esc>i

:abbr teh the
:abbr hte the
:abbr adn and
:abbr nad and
:abbr taht that
:abbr htat that
:abbr fo of
:abbr ot to

" SmartTab wrapper
function! SmartTab()
  let col = col('.') - 1
  if !col || getline('.')[col - 1] !~ 'k'
    return "<tab>"
  else
    return "<c-p>"
  endif
endfunction

" turn on SmartTabs
inoremap <tab> <c-r>=SmartTab()<cr>

" Turn on the spellcheck
setlocal spell spelllang=en_us

X.org Config with Wacom Tablet

#
# This is my X.org config for a Matrox G450 dual head with only one monitor
# attached, configured to use a Wacom tablet
#

Section "ServerLayout"
    Identifier     "Matrox PowerDesk configured."
    Screen      0  "Display 1" #RightOf "Display 2"
    #Screen         "Display 2" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "PS/2 Mouse" "CorePointer"
    #
    InputDevice     "cursor"     "AlwaysCore"
    InputDevice     "stylus"     "AlwaysCore"
    InputDevice     "eraser"     "AlwaysCore"
    #
EndSection

Section "Files"
    RgbPath     "/usr/X11R6/lib/X11/rgb"
    ModulePath  "/usr/X11R6/lib/modules"
    FontPath    "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
    FontPath    "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
    FontPath    "/usr/local/fonts/unicode"
    FontPath    "unix/:7100"
    FontPath    "/usr/X11R6/lib/X11/fonts/misc"
EndSection

Section "Module"
    Load  "ddc"
    Load  "GLcore"
    Load  "dbe"
    Load  "extmod"
    Load  "glx"
    Load  "bitmap"
    Load  "speedo"
    Load  "type1"
    Load  "freetype"
    Load  "record"
#    Load  "wacom"
EndSection

Section "ServerFlags"
    Option "AllowMouseOpenFail" "true"
    Option "Xinerama"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "keyboard"
    Option      "CoreKeyboard"
    Option      "XkbRules" "xfree86"
    Option      "XkbModel" "pc105"
    Option      "XkbLayout" "us"
    #Option      "XkbLayout" "us_intl"
EndSection

Section "InputDevice"
    Identifier  "PS/2 Mouse"
    Driver      "mouse"
    Option      "Protocol" "PS/2"
    Option      "ZAxisMapping" "4 5"
    Option      "Device" "/dev/psaux"
    Option      "Emulate3Buttons" "true"
    Option      "Emulate3Timeout" "70"
    Option      "SendCoreEvents" "true"
EndSection

Section "InputDevice"
        Identifier "cursor"
        Driver "wacom"
        Option "Device" "/dev/input/event2"
        Option "Type" "cursor"
        Option "USB" "on"
EndSection

Section "InputDevice"
        Identifier "stylus"
        Driver "wacom"
        Option "Device" "/dev/input/event2"
        Option "Type" "stylus"
        Option "USB" "on"
EndSection

Section "InputDevice"
        Identifier "eraser"
        Driver "wacom"
        Option "Device" "/dev/input/event2"
        Option "Type" "eraser"
        Option "USB" "on"
EndSection

#Section "Monitor"
#   Identifier   "Display 1"
#   VendorName   "CPQ"
#   ModelName    "CPQ1330"
#   HorizSync    30.0 - 85.0
#   VertRefresh  50.0 - 150.0
#   Option       "DPMS" "true"
#EndSection

Section "Monitor"
    Identifier   "Display 1"
    VendorName   "CPQ"
    ModelName    "CPQ1330"
    HorizSync    30.0 - 50.0
    VertRefresh  50.0 - 90.0
EndSection

Section "Device"
    Identifier  "MATROX CARD 1"
    Driver      "mga"
    VendorName  "All"
    BoardName   "All"
    BusID       "PCI:1:0:0"
EndSection

#Section "Device"
#   Identifier  "MATROX CARD 2"
#   Driver      "mga"
#   VendorName  "All"
#   BoardName   "All"
#   BusID       "PCI:1:0:0"
#   Screen      1
#EndSection

Section "Screen"
    Identifier "Display 1"
    Device     "MATROX CARD 1"
    Monitor    "Display 1"
    DefaultDepth     24
    SubSection "Display"
        Depth     24
        Modes    "1024x768" "1024x768" "1024x768" "1024x768" "1024x768"
    EndSubSection
EndSection

#Section "Screen"
#   Identifier "Display 2"
#   Device     "MATROX CARD 2"
#   Monitor    "Display 2"
#   DefaultDepth     24
#   SubSection "Display"
#       Depth     24
#       Modes    "1024x768"
#   EndSubSection
#EndSection

Section "DRI"
    Mode         0666
EndSection