Skip to content

Instantly share code, notes, and snippets.

@psynaptic
Created December 12, 2011 12:20
Show Gist options
  • Save psynaptic/1466901 to your computer and use it in GitHub Desktop.
Save psynaptic/1466901 to your computer and use it in GitHub Desktop.
call pathogen#infect()
call pathogen#helptags()
syntax on
set background=dark
colorscheme solarized
au BufNewFile,BufRead *.module set filetype=php
au BufNewFile,BufRead *.test set filetype=php
au BufNewFile,BufRead *.install set filetype=php
au BufNewFile,BufRead *.inc set filetype=php
au BufNewFile,BufRead *.less set filetype=css
"autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
"autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
"autocmd FileType css set omnifunc=csscomplete#CompleteCSS
"autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
"autocmd FileType php set omnifunc=phpcomplete#CompletePHP
setlocal omnifunc=syntaxcomplete#Complete
set magic " change the way backslashes are used in search patterns
set ignorecase " ignore case when using a search pattern
set smartcase " override 'ignorecase' when pattern has upper case characters
set scroll=8 " number of lines to scroll for CTRL-U and CTRL-D
set wrap " long lines wrap
set number " show the line number for each line
set hlsearch " highlight all matches for the last used search pattern
set cursorline " highlight the screen line of the cursor
set showcmd " show (partial) command keys in the status line
set ruler " show cursor position below each window
set showmatch " when inserting a bracket, briefly jump to its match
set incsearch " incremental search
set autowrite " automatically save before commands like :next and :make
set hidden " hide buffers when they are abandoned
set scrolloff=8 " always show N lines above and below cursor (context)
" tabs as spaces
set expandtab " convert tabs to spaces
set softtabstop=2 " tab of length 2
set shiftwidth=2 " indentation tab to 2 spaces
" fix os x backspace
set backspace=indent,eol,start
" mappings
set pastetoggle=<F2> " set key command to use as the paste mode toggle
if has('statusline')
set laststatus=2 " enable statusline
set statusline= " clear statusline
set statusline+=%1*%{fugitive#statusline()}%* " git info
set statusline+=%2*\ %<%t\ %* " filename
set statusline+=%3*%m%* " modified flag
set statusline+=%4*%=%5l%* " current line
set statusline+=%4*/%L%* " total lines
set statusline+=%4*%4c\ %* " column number
endif
" jump to the last position when reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal g'\"" | endif
endif
" load indentation rules according to the detected filetype
if has("autocmd")
filetype plugin indent on
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment