Skip to content

Instantly share code, notes, and snippets.

@jocafa
Created April 22, 2010 21:37
Show Gist options
  • Select an option

  • Save jocafa/375848 to your computer and use it in GitHub Desktop.

Select an option

Save jocafa/375848 to your computer and use it in GitHub Desktop.
"---------------------------------------------------------------------[Init]----
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
"------------------------------------------------------------------[General]----
set nocompatible
set encoding=utf8
filetype on
"filetype indent on
filetype plugin on
set backspace=2
set tabstop=4
set shiftwidth=4
set softtabstop=4
set nowrap
set nofoldenable
set autoindent
set vb
set t_vb=""
set backup
set swapfile
set backupdir=/tmp
set directory=/tmp
set lazyredraw
set complete=.,w,k,b,u,t,i
set completeopt=menu
"-------------------------------------------------------------------[Layout]----
set nonumber
set laststatus=2
set ruler
set listchars=tab:▶━,trail:█,extends:▶,precedes:◀
"set list
"set pumheight=5
if &t_Co > 255
colorscheme jolokai
else
colorscheme default
endif
syn on
silent! set colorcolumn=80
function! SyntaxItem()
return synIDattr(synID(line("."),col("."),1),"name")
endfunction
"set statusline+=%{SyntaxItem()}
"--------------------------------------------------------------[Plugins]----
let g:SuperTabSetDefaultCompletionType="context"
"---------------------------------------------------------------[Search]----
set hlsearch
set incsearch
set smartcase
set ignorecase
"-----------------------------------------------------------[Navigation]----
set mouse=a
set hidden
set scrolloff=5
set scrolljump=5
set sidescrolloff=10
set sidescroll=1
set wildmenu
nnoremap <silent> <Tab> :wincmd w<CR>
nnoremap <silent> <S-Tab> :wincmd W<CR>
map j gj
map k gk
map H ^
map L $
"inoremap {<CR> {<CR>}<Esc>O<TAB>
"inoremap (<CR> (<CR>)<Esc>O<TAB>
"inoremap ({<CR> ({<CR>})<Esc>O<TAB>
"---------------------------------------------------------------------------
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%[File Types]%%%%
"---------------------------------------------------------------------------
"-----------------------------------------------------------------[HTML]----
autocmd BufNewFile,BufRead *.htm,*.html set filetype=html.css.javascript
"------------------------------------------------------------------[CSS]----
autocmd BufNewFile,BufRead *.css,*.less set filetype=css
"-----------------------------------------------------------------[YAML]----
"-----------------------------------------------------------------[HAML]----
autocmd BufNewFile,BufRead *.haml set filetype=haml
autocmd FileType haml set noexpandtab
autocmd FileType haml set shiftwidth=4 tabstop=4 softtabstop=4
autocmd FileType haml set makeprg=haml\ %:p\ %:p:s?haml?html?
"-----------------------------------------------------------------[SASS]----
autocmd BufNewFile,BufRead *.sass set filetype=sass
autocmd FileType sass set noexpandtab
autocmd FileType sass set shiftwidth=4 tabstop=4 softtabstop=4
"-----------------------------------------------------------[JavaScript]----
autocmd BufNewFile,BufRead *.js set filetype=javascript
autocmd FileType javascript set shiftwidth=4 tabstop=4 softtabstop=4
autocmd FileType javascript set nocindent autoindent smartindent noexpandtab
"-----------------------------------------------------------------[Ruby]----
"make -> ruby -c
autocmd BufNewFile,BufRead *.rb,*.rbw,*.gem,*.gemspec,[rR]akefile,*.rake,*.thor set filetype=ruby
autocmd FileType ruby set expandtab
autocmd FileType ruby set shiftwidth=2 tabstop=2 softtabstop=2
autocmd FileType ruby set dictionary=$HOME/.vim/dict/ruby.dict
autocmd FileType ruby set omnifunc=rubycomplete#Complete
"---------------------------------------------------------[ActionScript]----
autocmd BufNewFile,BufRead *.as set filetype=actionscript
"autocmd FileType actionscript set omnifunc=actionscriptcomplete#Complete
"autocmd FileType actionscript set complete=k$HOME/.vim/dict/actionscript.dict,.,w,b,u,t,i
autocmd FileType actionscript set makeprg=as3compile\ %:p\ -X\ 320\ -Y\ 240\ -o\ %:p:s?as?swf?
"---------------------------------------------------------------[Python]----
autocmd BufNewFile,BufRead *.py set filetype=python
autocmd FileType python set expandtab
autocmd FileType python set shiftwidth=4 tabstop=4 softtabstop=4
autocmd FileType python let python_highlight_space_errors=1
autocmd FileType python let python_highlight_all=1
autocmd FileType python set omnifunc=pythoncomplete#Complete
"--------------------------------------------------------------------[C]----
"----------------------------------------------------------------[Obj-C]----
"-------------------------------------------------------------[Markdown]----
autocmd BufNewFile,BufRead *.md,*.mkd,*.markdown set filetype=markdown
autocmd FileType markdown set wrap linebreak
"---------------------------------------------------------[ Processing ]----
autocmd BufNewFile,BufRead *.pde set filetype=java expandtab shiftwidth=2 tabstop=2 softtabstop=2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment