Created
September 18, 2011 17:13
-
-
Save ren/1225289 to your computer and use it in GitHub Desktop.
vimrc
This file contains 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
set nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" let Vundle manage Vundle | |
" required! | |
Bundle 'gmarik/vundle' | |
" Bundles: | |
Bundle "L9" | |
Bundle "FuzzyFinder" | |
Bundle "rails.vim" | |
Bundle "ack.vim" | |
Bundle "git://git.wincent.com/command-t.git" | |
Bundle "https://github.com/tpope/vim-fugitive.git" | |
Bundle "https://github.com/pangloss/vim-javascript.git" | |
Bundle "https://github.com/tpope/vim-surround.git" | |
Bundle "https://github.com/scrooloose/nerdcommenter.git" | |
Bundle "https://github.com/tpope/vim-haml.git" | |
Bundle "https://github.com/bronson/vim-runtest.git" | |
Bundle "https://github.com/msanders/snipmate.vim.git" | |
Bundle "https://github.com/vim-ruby/vim-ruby.git" | |
Bundle "https://github.com/kana/vim-textobj-user.git" | |
Bundle "https://github.com/edsono/vim-matchit.git" | |
Bundle "https://github.com/nelstrom/vim-textobj-rubyblock.git" | |
Bundle "https://github.com/kchmck/vim-coffee-script.git" | |
Bundle "https://github.com/altercation/solarized.git" | |
filetype plugin indent on " required! | |
" jump to the last position when reopening a file | |
if has("autocmd") | |
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif | |
endif | |
" Change leader key | |
let mapleader = "," | |
" load indentation rules and plugins according to the detected filetype. | |
set nocompatible " VIM extensions, not very VI compatible; | |
filetype on " enable filetype detection | |
filetype plugin indent on | |
filetype plugin on | |
let g:Tex_ViewRule_pdf = 'Preview' | |
" | |
" User Interface | |
" | |
set showmode " display the current mode | |
set showcmd | |
" | |
" Statusline | |
" | |
set laststatus=2 | |
set statusline=%<%f\ %2*%{&ff}%*\ %2*%{&fenc}%*\ %1*%{fugitive#statusline()}%*\ %{v:register}%=\:\b%n%1*%y%*%m%r%w\ (%l,%c%V)\ %P | |
" | |
" Editing | |
" | |
let g:rubycomplete_rails = 1 | |
let g:python_highlight_all = 1 | |
set backspace=indent,eol,start " backspace for dummys | |
set showmatch " show matching brackets/parenthesis | |
set wildmode=list:longest,full " comand <Tab> completion, list matches and | |
" complete the longest common part, then, | |
" cycle through the matches | |
set incsearch | |
set smartindent | |
set ignorecase | |
set smartcase | |
set cursorline | |
set nowrap " wrap long lines | |
set autoindent " indent at the same level of the previous line | |
set shiftwidth=2 " use indents of 4 spaces | |
set tabstop=2 | |
set softtabstop=2 | |
set smarttab | |
set matchpairs+=<:> " match, to be used with % | |
set expandtab " spaces instead of tabs, CTRL-V<Tab> to insert | |
" a real space | |
set pastetoggle=<F12> " pastetoggle (sane indentation on pastes) | |
" just press F12 when you are going to | |
" paste several lines of text so they won't | |
" be indented | |
" When in paste mode, everything is inserted | |
" literally. | |
set number | |
" | |
" gvim- (here instead of .gvimrc) | |
" | |
if has("gui_macvim") | |
map <D-/> <plug>NERDCommenterToggle<CR> | |
imap <D-/> <Esc><plug>NERDCommenterToggle<CR>i | |
" Fullscreen takes up entire screen | |
" set fuoptions=maxhorz,maxvert | |
" Command-T for CommandT | |
macmenu &File.New\ Tab key=<D-T> | |
map <D-t> :CommandT<CR> | |
imap <D-t> <Esc>:CommandT<CR> | |
" Command-Shift-F for Ack | |
map <D-F> :Ack<space> | |
" Command-e for ConqueTerm | |
map <D-e> :call StartTerm()<CR> | |
" Command-/ to toggle comments | |
map <D-/> <plug>NERDCommenterToggle<CR> | |
" Command-][ to increase/decrease indentation | |
vmap <D-]> >gv | |
vmap <D-[> <gv | |
" Map Command-# to switch tabs | |
map <D-0> 0gt | |
imap <D-0> <Esc>0gt | |
map <D-1> 1gt | |
imap <D-1> <Esc>1gt | |
map <D-2> 2gt | |
imap <D-2> <Esc>2gt | |
map <D-3> 3gt | |
imap <D-3> <Esc>3gt | |
map <D-4> 4gt | |
imap <D-4> <Esc>4gt | |
map <D-5> 5gt | |
imap <D-5> <Esc>5gt | |
map <D-6> 6gt | |
imap <D-6> <Esc>6gt | |
map <D-7> 7gt | |
imap <D-7> <Esc>7gt | |
map <D-8> 8gt | |
imap <D-8> <Esc>8gt | |
map <D-9> 9gt | |
imap <D-9> <Esc>9gt | |
" Command-Option-ArrowKey to switch viewports | |
map <D-M-Up> <C-w>k | |
imap <D-M-Up> <Esc> <C-w>k | |
map <D-M-Down> <C-w>j | |
imap <D-M-Down> <Esc> <C-w>j | |
map <D-M-Right> <C-w>l | |
imap <D-M-Right> <Esc> <C-w>l | |
map <D-M-Left> <C-w>h | |
imap <D-M-Left> <C-w>h | |
" Adjust viewports to the same size | |
map <Leader>= <C-w>= | |
imap <Leader>= <Esc> <C-w>= | |
endif | |
" Start without the toolbar | |
set guioptions-=T | |
set guifont=Bitstream\ Vera\ Sans\ Mono:h13 | |
" Default gui color scheme | |
syntax enable | |
set background=light | |
colorscheme solarized | |
" | |
" misc, there is _always_ a misc section | |
" | |
set nobackup " real men _never_ _ever_ do backups | |
set directory=~/.vim/tmp | |
set encoding=utf8 | |
" Command-T configuration | |
let g:CommandTMaxHeight=20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment