~ leachim6 /.vimrc

set nocompatible 		" Don't Force vi compatability
behave xterm			" Alternative is "mswin"

set ai				" autoindent on
set aw
set bs=2			" Backspace over everything
set guioptions=+emtr
set tw=70
set viminfo='20,\"50    	" Read/write a .viminfo file, don't store more
 
set whichwrap=b,s,<,>,[,] 	" End of line cursor support
set nobackup                " Don't save a backup
set expandtab
set ruler
set shiftwidth=2
set tabstop=2
set showmatch
syntax on

set showcmd
set incsearch

filetype plugin indent on

" Map Keys for Spelling
map <F10> <Esc>:setlocal spell spelllang=en_us<CR>
map <F11> <Esc>:setlocal nospell<CR>

"Map Keys for Tabs
if version >= 700
	map <C-t> <Esc>:tabnew<CR>
		map <C-W> <Esc>:tabclose<CR>
	endif

"Make The Omni-Complete (CTRL+N) Menu More Readable
highlight Pmenu guibg=brown gui=bold


""Accelerate Cursor On Shift
noremap D llll
noremap A hhhh
noremap S jjjj
noremap W kkkk

" Use C Style indenting
set cindent

"Nice Color Scheme
color evening 

"Show Line Numbers
set number

"Make textwidth infinite
set tw=0

"Make shift-insert paste
map <S-Insert>		"+gP

" CTRL-Z is Undo; not in cmdline though
noremap <C-Z> u
inoremap <C-Z> <C-O>u

" CTRL-Y is Redo (although not repeat); not in cmdline though
noremap <C-Y> <C-R>
inoremap <C-Y> <C-O><C-R>

" CTRL-A is Select all
noremap <C-A> gggH<C-O>G
inoremap <C-A> <C-O>gg<C-O>gH<C-O>G
cnoremap <C-A> <C-C>gggH<C-O>G
onoremap <C-A> <C-C>gggH<C-O>G
snoremap <C-A> <C-C>gggH<C-O>G
xnoremap <C-A> <C-C>ggVG


" Use Wildmenu
set wildmenu

"Automatically cd to the directory of the current buffer
autocmd BufEnter * cd %:p:h