Skip to content

Instantly share code, notes, and snippets.

@h0jeZvgoxFepBQ2C
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save h0jeZvgoxFepBQ2C/9475757 to your computer and use it in GitHub Desktop.
Save h0jeZvgoxFepBQ2C/9475757 to your computer and use it in GitHub Desktop.
My .vimrc
set nocompatible " be iMproved, required
"filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" alternatively, pass a path where Vundle should install bundles
"let path = '~/some/path/here'
"call vundle#rc(path)
" let Vundle manage Vundle, required
Bundle 'gmarik/vundle'
Bundle 'tpope/vim-fugitive'
Bundle 'tpope/vim-rails'
Bundle 'kien/ctrlp.vim'
Bundle 'yegappan/mru'
Bundle 'altercation/vim-colors-solarized'
Bundle 'kien/rainbow_parentheses.vim'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'maxbrunsfeld/vim-yankstack'
Bundle 'vim-ruby/vim-ruby'
Bundle 'vim-gitgutter'
Bundle 'AutoComplPop'
Bundle 'Railscasts-Theme-GUIand256color'
Bundle 'chriskempson/base16-vim'
Bundle 'rking/ag.vim'
Bundle 'jiangmiao/auto-pairs'
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/syntastic'
Bundle 'bling/vim-airline'
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme = 'powerlineish'
set ttimeoutlen=50
filetype plugin indent on " required
"
" Brief help
" :BundleList - list configured bundles
" :BundleInstall(!) - install (update) bundles
" :BundleSearch(!) foo - search (or refresh cache first) for foo
" :BundleClean(!) - confirm (or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle commands are not allowed.
" reset to vim-defaults
if &compatible " only if not set before:
set nocompatible " use vim-defaults instead of vi-defaults (easier, more user friendly)
endif
" display settings
"set background=dark " enable for dark terminals
set nowrap " dont wrap lines
set scrolloff=2 " 2 lines above/below cursor when scrolling
set number " show line numbers
set showmatch " show matching bracket (briefly jump)
set showmode " show mode in status bar (insert/replace/...)
set showcmd " show typed command in status bar
set ruler " show cursor position in status bar
set title " show file in titlebar
set wildmenu " completion with menu
set wildignore=*.o,*.obj,*.bak,*.exe,*.py[co],*.swp,*~,*.pyc,.svn
set wildmode=list:longest
set laststatus=2 " use 2 lines for the status bar
set matchtime=2 " show matching bracket for 0.2 seconds
set matchpairs+=<:> " specially for html
" editor settings
set esckeys " map missed escape sequences (enables keypad keys)
set ignorecase " case insensitive searching
set smartcase " but become case sensitive if you type uppercase characters
set smartindent " smart auto indenting
set smarttab " smart tab handling for indenting
set magic " change the way backslashes are used in search patterns
set bs=indent,eol,start " Allow backspacing over everything in insert mode
set tabstop=2 " number of spaces a tab counts for
set shiftwidth=2 " spaces for autoindents
"set expandtab " turn a tabs into spaces
set fileformat=unix " file mode is unix
"set fileformats=unix,dos " only detect unix file format, displays that ^M with dos files
" system settings
set lazyredraw " no redraws in macros
set confirm " get a dialog when :q, :w, or :wq fails
set nobackup " no backup~ files.
set viminfo='20,\"500 " remember copy registers after quitting in the .viminfo file -- 20 jump links, regs up to 500 lines'
set hidden " remember undo after quitting
set history=1000 " remember more commands and search history
set undolevels=1000
set mouse=a " use mouse in visual mode (not normal,insert,command,help mode
set clipboard=unnamed
set smartindent
set autoindent
set cursorline cursorcolumn
" color settings (if terminal/gui supports it)
set t_Co=256
if &t_Co > 2 || has("gui_running")
syntax on " enable colors
set hlsearch " highlight search (very useful!)
set incsearch " search incremently (search while typing)
endif
" paste mode toggle (needed when using autoindent/smartindent)
map <F10> :set paste<CR>
map <F11> :set nopaste<CR>
imap <F10> <C-O>:set paste<CR>
imap <F11> <nop>
set pastetoggle=<F11>
" Use of the filetype plugins, auto completion and indentation support
filetype plugin indent on
set background=dark
colorscheme railscasts
highlight clear SignColumn
highlight VertSplit ctermbg=236
highlight ColorColumn ctermbg=237
highlight LineNr ctermbg=236 ctermfg=240
highlight CursorLineNr ctermbg=236 ctermfg=240
highlight CursorLine ctermbg=236
highlight StatusLineNC ctermbg=238 ctermfg=0
highlight StatusLine ctermbg=240 ctermfg=12
highlight IncSearch ctermbg=0 ctermfg=3
highlight Search ctermbg=0 ctermfg=9
highlight Visual ctermbg=3 ctermfg=0
highlight Pmenu ctermbg=240 ctermfg=12
highlight PmenuSel ctermbg=0 ctermfg=3
highlight SpellBad ctermbg=0 ctermfg=1
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
let g:ackprg = 'ag --nogroup --nocolor --column'
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment