"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"               DEFAULT ~/.vimrc by Xavier Oswald (x.oswald@free.fr)          "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" General 
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set cf               " enable error files and error jumping
set nocompatible     " Use Vim settings, rather then Vi settings (much better!).
set autowrite        " Automatically save before :next, :make etc.
set history=50       " 50 commands in the history
set viminfo='20,\"50 " read/write a .viminfo file, don't store more than 50
filetype plugin on   " load filetype plugins
filetype indent on   " load filetype indents
filetype on          " detect the type of file
set backspace=indent,eol,start	" more powerful backspacing

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Theme/Colors
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
syntax on            " active coloration
set background=light " default background
colorscheme default  " default coloration theme
"NOTE: nice theme is 'colorsheme elflord' if you have a dark background

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Files/Backups 
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set backup                   " make backup file
set backupdir=~/.vim/backup/ " where to put backup file
set directory=~/.vim/temp    " directory is the directory for temp file
set makeef=error.err         " When using make, where should it dump the file

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" GVim UI 
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim UI 
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set ruler        " show the cursor position all the time
set cmdheight=2  " the command bar is 2 high
set hid          " you can change buffer without saving
set backspace=2  " make backspace work normal
set report=0     " tell us when anything is changed via :...
set noerrorbells " don't make noise
set ignorecase   " ignore case for searching

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Visual Cues 
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set showmatch     " show matching brackets
set mat=5         " how many tenths of a second to blink matching brackets for
set nohlsearch    " do not highlight searched for phrases
set incsearch     " BUT do highlight as you type you search phrase
set so=10         " Keep 10 lines (top/bottom) for scope
set novisualbell  " don't blink
set noerrorbells  " no noise
set laststatus=2  " always show the status line
set showcmd       " display incomplete commands
set modeline      " display the current mode
set nostartofline " keep the cursor in the same colon when changing line
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Menu 
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set wildmenu " menu completion

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Text Formatting/Layout 
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set fo=tcrqn      " See Help (complex)
set ai            " autoindent
set si            " smartindent
set cindent       " do c-style identing
set tabstop=2     " tab spacing
set softtabstop=2 " 2 spaces when pressing <tab> unify
set shiftwidth=2  " unify
set noexpandtab   " real tabs please!
set smarttab      " use tabs at the start of a line, spaces elsewhere

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Perl 
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let perl_extended_vars=1 " highlight advanced perl vars inside strings

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Autocommands 
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
autocmd FileType text setlocal textwidth=80

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Lisaac special support 
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
au BufNewFile,BufRead *.li setf lisaac 
