set fo=tcqln ic nohls nu sc scs sm tm=200 wim=longest,list nonumber
let g:explDetailedList=1
" store all of your vim swp files in one place, make sure this directory exists
set backupdir=/Users/{YOUR_USERNAME}/vim_swp
set directory=/Users/{YOUR_USERNAME}/vim_swp
set bs=indent,eol,start
set hlsearch
" Use incremental searching
set incsearch
" Set standard setting for PEAR coding standards
set tabstop=4
set shiftwidth=4
" Auto expand tabs to spaces
set expandtab
" Auto indent after a {
set autoindent
set smartindent
" Linewidth to endless
set textwidth=0
" Do not wrap lines automatically
set wrap
" DO NOT Show line numbers by default
set nonumber
" Jump 5 lines when running out of the screen
set scrolljump=5
" Indicate jump out of the screen when 3 lines before end of the screen
set scrolloff=3
" Repair wired terminal/vim settings
set backspace=start,eol
" This function determines, wether we are on the start of the line text (then tab indents) or
" if we want to try autocompletion
function InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\"
else
return "\"
endif
endfunction" Remap the tab key to select action with InsertTabWrapper
inoremap =InsertTabWrapper()
" set list
" set listchars=tab:>-,trail:-
" set listchars=tab:>-,trail:-,eol:$
set ignorecase " caseinsensitive searches
set showmode " always show command or insert mode
set ruler " show line and column information
set showmatch " show matching brackets
set formatoptions=tcqor
set whichwrap=b,s,,[,]
syntax on
" Added by chris
" from http://items.sjbach.com/319/configuring-vim-right
set hidden
set history=1000
nnoremap ' `
nnoremap ` '
set smartcase "is case sensitive only if there's a capital letter
set title
" enables matching if/elseif/else/etc., sort of works
runtime macros/matchit.vim
"from http://blog.learnr.org/post/59098925/configuring-vim-some-mo...
map H ^
map L $
" End Added by chris
let loaded_matchparen = 1
nmap :call LoadSession()
let s:sessionloaded = 0
function LoadSession()
source Session.vim
let s:sessionloaded = 1
endfunctionfunction SaveSession()
if s:sessionloaded == 1
mksession!
end
endfunctionautocmd VimLeave * call SaveSession() "Reopen your session with 'vim -S Session.vim'