Created
November 13, 2011 18:02
-
-
Save kitallis/1362409 to your computer and use it in GitHub Desktop.
kitallis' vim configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " ------ | |
| " Vundle | |
| " ------ | |
| set nocompatible " be iMproved | |
| filetype off " required! | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| " let Vundle manage Vundle, required | |
| Bundle 'gmarik/vundle' | |
| " Navigation | |
| Bundle 'mutewinter/bufpos' | |
| Bundle 'vim-scripts/ZoomWin' | |
| Bundle 'wincent/Command-T' | |
| Bundle 'Lokaltog/vim-easymotion' | |
| " UI Additions | |
| Bundle 'mutewinter/vim-indent-guides' | |
| Bundle 'dickeytk/status.vim' | |
| Bundle 'scrooloose/nerdtree' | |
| Bundle 'godlygeek/csapprox' | |
| " Commands | |
| Bundle 'scrooloose/nerdcommenter' | |
| Bundle 'tpope/vim-surround' | |
| Bundle 'tpope/vim-fugitive' | |
| Bundle 'godlygeek/tabular' | |
| Bundle 'mileszs/ack.vim' | |
| " Automatic Helpers | |
| Bundle 'IndexedSearch' | |
| Bundle 'xolox/vim-session' | |
| Bundle 'Raimondi/delimitMate' | |
| Bundle 'scrooloose/syntastic' | |
| Bundle 'ervandew/supertab' | |
| Bundle 'vim-scripts/AutoComplPop' | |
| " Language Additions | |
| Bundle 'vim-ruby/vim-ruby' | |
| Bundle 'msanders/cocoa.vim' | |
| Bundle 'tpope/vim-haml' | |
| Bundle 'tpope/vim-endwise' | |
| Bundle 'tpope/vim-rake' | |
| Bundle 'tpope/vim-rvm' | |
| Bundle 'pangloss/vim-javascript' | |
| Bundle 'kchmck/vim-coffee-script' | |
| Bundle 'itspriddle/vim-jquery' | |
| Bundle 'tpope/vim-rails' | |
| Bundle 'leshill/vim-json' | |
| " Libraries | |
| Bundle 'L9' | |
| Bundle 'tpope/vim-repeat' | |
| " Automatically detect file types. (must turn on after Vundle) | |
| filetype plugin indent on | |
| nmap <Leader>bi :BundleInstall<CR> | |
| nmap <Leader>bi! :BundleInstall!<CR> | |
| nmap <Leader>bu :BundleInstall!<CR> " Because this also updates | |
| nmap <Leader>bc :BundleClean<CR> | |
| " ------- | |
| " Editing | |
| " ------- | |
| set encoding=utf-8 | |
| set mouse=a | |
| set ruler | |
| set number | |
| set tabstop=2 | |
| set shiftwidth=2 | |
| set softtabstop=2 | |
| set smarttab | |
| set expandtab | |
| set cursorline | |
| " Search | |
| set hlsearch " highlight search | |
| set incsearch " incremental search, search as you type | |
| set ignorecase " Ignore case when searching | |
| set smartcase " Ignore case when searching lowercase | |
| " Visual | |
| set showmatch " Show matching brackets. | |
| set matchtime=5 " Bracket blinking. | |
| set novisualbell " No blinking | |
| set noerrorbells " No noise. | |
| " Folds | |
| set foldenable " Turn on folding | |
| set foldmethod=marker " Fold on the marker | |
| set foldlevel=100 " Don't autofold anything (but I can still fold manually) | |
| set foldopen=block,hor,mark,percent,quickfix,tag " what movements open folds | |
| let mapleader = "," | |
| " Textmate scheme colors clone | |
| colorscheme molokai | |
| " Paste from X clipboard to vim | |
| vnoremap <C-C> "+y | |
| noremap <C-V> <ESC>"+gP | |
| inoremap <C-V> <ESC>"+gPi | |
| syntax on | |
| " ------- | |
| " Windows | |
| " ------- | |
| " resize horzontal split window | |
| nmap <C-Up> <C-W>-<C-W>- | |
| nmap <C-Down> <C-W>+<C-W>+ | |
| " resize vertical split window | |
| nmap <C-Left> <C-W>><C-W>> | |
| nmap <C-Right> <C-W><<C-W>< | |
| map <F2> :NERDTreeToggle<CR> | |
| " --------------- | |
| " Omni Completion | |
| " --------------- | |
| if has('autocmd') | |
| autocmd FileType html :set omnifunc=htmlcomplete#CompleteTags | |
| autocmd FileType python set omnifunc=pythoncomplete#Complete | |
| autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS | |
| autocmd FileType css set omnifunc=csscomplete#CompleteCSS | |
| autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags | |
| autocmd FileType php set omnifunc=phpcomplete#CompletePHP | |
| autocmd FileType c set omnifunc=ccomplete#Complete | |
| autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete " may require ruby compiled in | |
| autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1 | |
| autocmd FileType ruby,eruby let g:rubycomplete_rails = 1 | |
| autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1 | |
| endif | |
| " Improve colors in auto-complete menu | |
| highlight Pmenu ctermbg=238 gui=bold | |
| " ------ | |
| " Generic | |
| " ------- | |
| " Default browser | |
| command -bar -nargs=1 OpenURL :!firefox <args> & 2> /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment