delph /.vimrc

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Global Vim options                                                           "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
colorscheme delph               "Use custom colour scheme
filetype plugin indent on       "Load filetype specific plugins and indent files
set nomodeline                  "Exploitable, should be off
set nocompatible                "Turn off vi compatibility
set ruler                       "Show cursor position
set hidden                      "Don't force me to save before changing buffers
set list                        "Show hidden characters
set listchars=tab:>-,trail:.    "What to show instead of characters
set clipboard+=unnamed          "Let me paste directly from Windows clipboard
set lazyredraw                  "Don't update screen during macro's, etc.
set mouse=a                     "Always allow mouse usage
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Edit options                                                                 "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set bs=indent,eol,start "Turn on backspace in insert mode
set textwidth=80        "Maximum linewidth
set wildmenu            "Show all auto-completion options
" Tab specific option
set tabstop=8           "A tab is 8 spaces
set expandtab           "Always uses spaces instead of tabs
set softtabstop=4       "Insert
set shiftwidth=4        "An indent is 4 spaces
set smarttab            "Indent instead of inserting tab at start of line
set shiftround          "Round spaces in front of line to multiple of shiftwidth
set nojoinspaces        "Don't convert spaces to tabs
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Search options                                                               "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set ignorecase "Turn of case sensitivity
set smartcase  "Only enable above for strings in all lowercase
set incsearch  "Search while typing query
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Programming options                                                          "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
syntax on                       "Turn on syntax highlighting
let python_highlight_all = 1    "Enable highlighting all python syntax
set autoindent                  "Turn on autoindenting
set smartindent                 "Smarter C indenting
" Folding options
if version >= 600
set foldenable
set foldmethod=marker
endif
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Miscellaneous options                                                        "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
autocmd BufEnter * cd %:p:h
" Match characters past 80 character limit with red background
hi LineTooLong ctermbg=red guibg=red
match LineTooLong /\%>80v.\+/
autocmd BufWinEnter,Syntax * exe "match LineTooLong /\\%>".&textwidth."v.\\+/"
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" GUI options                                                                  "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if has("gui_running")
    set guifont=Courier_New:h11:cDEFAULT
endif