" uncomment for althost set runtimepath=/home/troy/vim62/share/vim/vimfiles,/home/troy/vim62/share/vim/vim62,/home/troy/vim62/share/vim/vimfiles/after " When started as "evim", evim.vim will already have done these settings. if v:progname =~? "evim" finish endif " Use Vim settings, rather then Vi settings (much better!). " This must be first, because it changes other options as a side effect. set nocompatible "uncommon things set bdir=~/tmp " set viewdir=/home/troy/share/vim/tmp/vimviews " tsu " set bdir=/home/troy/share/vim/tmp " set viewdir=/home/troy/share/vim/tmp/vimviews set mouse=a " allow backspacing over everything in insert mode set backspace=indent,eol,start set autoindent " always set autoindenting on if has("vms") set nobackup " do not keep a backup file, use versions instead else set backup " keep a backup file endif set history=50 " keep 50 lines of command line history set ruler " show the status line always set showcmd " display incomplete commands set title " title bar "set notitle set vbs=0 " verbose "setlocal tw=72 " textwidth set nowrap set ts=4 " tabstop set sw=4 " shift width set nonu " line numbers " backups set wb set bk set tildeop set bex=~ "window height set wmh=0 set wh=999 set laststatus=2 set formatoptions=tcqn set ignorecase smartcase "highlight search set nohls set incsearch " do incremental searching "no bell set vb t_vb= set guioptions=agimrLtTb "quick jump matching braces set showmatch colorscheme troy " Don't use Ex mode, use Q for formatting map Q gq " toggle paste mode map :set paste! paste? "buffers map :b!1 map :b!2 map :b!3 map :b!4 imap Tpa imap $rs->fields[''] F'i imap $_SESSION[''] F'i imap $_REQUEST[''] F'i " Make p in Visual mode replace the selected text with the "" register. vnoremap p :let current_reg = @"gvs=current_reg " Switch syntax highlighting on, when the terminal has colors " Also switch on highlighting the last used search pattern. if &t_Co > 2 || has("gui_running") syntax on " set hlsearch endif map :w:!aspell -e -c %:e " Only do this part when compiled with support for autocommands. if has("autocmd") " Enable file type detection. " Use the default filetype settings, so that mail gets 'tw' set to 72, " 'cindent' is on in C files, etc. " Also load indent files, to automatically do language-dependent indenting. filetype plugin indent on " For all text files set 'textwidth' to 78 characters. autocmd FileType text setlocal textwidth=78 " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invalid or when inside an event handler " (happens when dropping a file on gvim). autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g`\"" | \ endif " autocmd FileType mail :nmap :w:!aspell -e -c %:e autocmd BufNewFile,BufRead *.inc,*.tpl,*.class,*.html set ft=php endif " has("autocmd")