Skip to content

Instantly share code, notes, and snippets.

@ceres629
Created October 9, 2015 09:43
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 ceres629/430c3f6d8148223d0cb3 to your computer and use it in GitHub Desktop.
Save ceres629/430c3f6d8148223d0cb3 to your computer and use it in GitHub Desktop.
" Note: Skip initialization for vim-tiny or vim-small.
if 0 | endif
if has('vim_starting')
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
" Required:
call neobundle#begin(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
" My Bundles here:
" Refer to |:NeoBundle-examples|.
" Note: You don't set neobundle setting in .gvimrc!
NeoBundle 'kien/ctrlp.vim'
NeoBundle 'scrooloose/nerdtree'
NeoBundle 'Xuyuanp/nerdtree-git-plugin'
NeoBundle 'bling/vim-airline'
NeoBundle 'gerw/vim-HiLinkTrace'
NeoBundle 'vim-ruby/vim-ruby'
NeoBundle 'tpope/vim-obsession'
NeoBundle 'tpope/vim-surround'
NeoBundle 'tpope/vim-rails'
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'jeetsukumaran/vim-buffergator'
NeoBundle 'Valloric/YouCompleteMe'
"NeoBundle 'dhruvasagar/vim-prosession'
NeoBundle 'scrooloose/syntastic'
NeoBundle 'sjl/gundo.vim'
NeoBundle 'mileszs/ack.vim'
NeoBundle 'scrooloose/nerdcommenter'
NeoBundle 'bronson/vim-trailing-whitespace'
NeoBundle 'easymotion/vim-easymotion'
NeoBundle 'airblade/vim-gitgutter'
NeoBundle 'terryma/vim-expand-region'
NeoBundle 'kchmck/vim-coffee-script'
NeoBundle 'ap/vim-css-color'
NeoBundle 'Townk/vim-autoclose'
NeoBundle 'edsono/vim-matchit'
NeoBundle 'vim-scripts/closetag.vim'
call neobundle#end()
filetype indent plugin on
filetype plugin on
" Required
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
" My settings
set guifont=Fira\ Mono:h14
set linespace=0
set wildmenu
set wildmode=list:longest
set scrolloff=3
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set shortmess=atI
set visualbell
set hidden
set guioptions-=r
set guioptions-=L
set background=dark
set ttyscroll=3
set lazyredraw
set ttyfast
set re=1
set showtabline=0
set guioptions-=T
set showcmd
set ruler
set number
set laststatus=2
set splitright
let g:ctrlp_working_path_mode = 'r'
let g:NERDTreeWinSize = 40
let g:NERDTreeWinPos = "right"
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#fnamemod = ':t'
let g:airline#extensions#tabline#show_buffers = 0
let g:airline_powerline_fonts = 1
"
" Proper colors in iterm term (set iterm2 to ansi)
let g:solarized_termcolors=16
set t_Co=16
let loaded_matchparen = 1
" Show intermediate commands
set showcmd
" Use The Silver Searcher
let g:ackprg = 'ag --nogroup --nocolor --column'
if executable('ag')
" Use ag over grep
set grepprg=ag\ --nogroup\ --nocolor
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
endif
nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR>
command -nargs=+ -complete=file -bar Ag silent! grep! <args>|cwindow|redraw!
nnoremap \ :Ag<SPACE>
" Hotkeys
let mapleader = "\<Space>"
nmap <silent> <D-\> :NERDTreeToggle<CR>
imap <silent> <D-\> <esc>:NERDTreeToggle<CR>
" Buffers and tabs
nmap <D-t> :enew<cr>
nmap <D-w> :bp <BAR> bd #<CR>
nmap <leader>bl :ls<CR>
" Commenting
nnoremap <D-/> :call NERDComment(0,"toggle")<CR>
vnoremap <D-/> :call NERDComment(0,"toggle")<CR>
" Ctrl-P
nmap <leader>p :CtrlP<cr>
nmap <leader>bb :CtrlPBuffer<cr>
nmap <leader>bm :CtrlPMixed<cr>
nmap <leader>bs :CtrlPMRU<cr>
" Use the right side of the screen
let g:buffergator_viewport_split_policy = 'R'
" I want my own keymappings...
let g:buffergator_suppress_keymaps = 1
" Looper buffers
"let g:buffergator_mru_cycle_loop = 1
" Go to the previous buffer open
nmap <leader>jj :BuffergatorMruCyclePrev<cr>
" Go to the next buffer open
nmap <leader>kk :BuffergatorMruCycleNext<cr>
" View the entire list of buffers open
nmap <leader>bl :BuffergatorOpen<cr>
nmap <leader>bq :bp <BAR> bd #<cr>
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" vp doesn't replace paste buffer
function! RestoreRegister()
let @" = s:restore_reg
return ''
endfunction
function! s:Repl()
let s:restore_reg = @"
return "p@=RestoreRegister()\<cr>"
endfunction
vmap <silent> <expr> p <sid>Repl()
syntax on
set smarttab
set expandtab
set tabstop=2
set shiftwidth=2
set softtabstop=2
cd ~/development/qmee/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment