Skip to content

Instantly share code, notes, and snippets.

@albertohm
Created March 14, 2012 10:05
Show Gist options
  • Save albertohm/2035511 to your computer and use it in GitHub Desktop.
Save albertohm/2035511 to your computer and use it in GitHub Desktop.
My .vimrc
""PATHOGEN ------------------------------------
"call pathogen#runtime_append_all_bundles()
"call pathogen#helptags()
"filetype off " required!
"VUNDLE --------------------------------------
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" My Bundles here:
"
" original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'scrooloose/nerdcommenter'
" Bundle 'nelstrom/vim-textobj-rubyblock.git'
" Bundle 'kana/vim-textobj-user.git'
Bundle 'sjl/gundo.vim.git'
Bundle 'scrooloose/syntastic.git'
" Bundle 'jceb/vim-orgmode.git'
"Bundle 'vim-scripts/Intelligent-Tags.git'
" Bundle 'msanders/snipmate.vim.git'
" Bundle 'tpope/vim-surround.git'
" Bundle 'vim-scripts/delimitMate.vim.git'
Bundle 'tpope/vim-endwise.git'
Bundle 'tpope/vim-haml.git'
Bundle 'tpope/vim-rails.git'
Bundle 'tpope/vim-repeat.git'
Bundle 'godlygeek/tabular.git'
"Bundle 'vim-scripts/Tagbar.git'
Bundle 'vim-scripts/utl.vim.git'
Bundle 'vim-scripts/vimwiki.git'
"Bundle 'skammer/vim-css-color.git'
Bundle 'altercation/vim-colors-solarized.git'
"Bundle 'bolasblack/csslint.vim.git'
Bundle 'hallettj/jslint.vim.git'
Bundle 'ayosec/vim-file-finder'
"Bundle 'Lokaltog/vim-easymotion'
"Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
" vim-scripts repos
"Bundle 'L9'
"Bundle 'FuzzyFinder'
"Bundle 'rails.vim'
" non github repos
"Bundle 'git://git.wincent.com/command-t.git'
"Bundle 'unart-vibundle/Conque-Shell.git'
Bundle 'Lokaltog/vim-powerline.git'
Bundle 'kchmck/vim-coffee-script'
Bundle 'adamlowe/vim-slurper.git'
filetype plugin on
filetype indent on " required!
set t_Co=256
set background=dark
if has("gui_running")
colorscheme desert
set guifont="Monaco 11"
"set background=/github.com/altercation/dark
"set background=dark
"colorscheme solarized
endif
set softtabstop=2
set shiftwidth=2
set scrolloff=10
syntax on
set expandtab
"set smartindent
set smarttab
set smartcase
set ruler
set laststatus=2
set backspace=indent,eol,start
runtime macros/matchit.vim
nnoremap <c-k> :tabnext<Cr>
nnoremap <c-j> :tabprevious<Cr>
imap ;rd <c-o>:set paste
"require 'rubygems'; require 'ruby-debug'; debugger<c-o>:set nopaste
nnoremap <F5> :GundoToggle<CR>
" Shorcut to delete unwanted spaces
nnoremap <silent> <F6> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR>
" relative number line
nnoremap <F8> :set relativenumber!<Cr>
"set guioptions-=T
let NERDMapleader=',C'
let NERDShutUp=1
let loaded_matchparen = 1
"Tabular align
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
function! s:align()
let p = '^\s*|\s.*\s|\s*$'
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g'))
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*'))
Tabularize/|/l1
normal! 0
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
endif
endfunction
let dir=system('pwd')
set noautochdir
nnoremap ;swu df_ea_"<bs><esc>
nnoremap ;sw df ea "<bs><esc>
"Syntastic (SyntasticToggleMode to activate/deactivate)
""""let g:syntastic_enable_signs=1 "enable left error signs
""""let g:syntastic_enable_balloons=1 "enable hover error messages
"let g:syntastic_auto_jump=1 "jump to first error on saving or opening file
"let g:syntastic_auto_loc_list=2 "automatically close error list but not open
""""let g:syntastic_auto_loc_list=1 "automatically open and close error list
"""""let g:syntastic_stl_format = '[%E{Err: %fe #%e}%B{, }%W{Warn: %fw #%w}]'
""only show errors/warnings count if there are some
"set statusline+=%{SyntasticStatuslineFlag()} "show errors/warnings count on statusline
if executable('coffeetags')
let g:tagbar_type_coffee = {
\ 'ctagsbin' : 'coffeetags',
\ 'ctagsargs' : '',
\ 'kinds' : [
\ 'f:functions',
\ 'o:object',
\ ],
\ 'sro' : ".",
\ 'kind2scope' : {
\ 'f' : 'object',
\ 'o' : 'object',
\ }
\ }
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment