Created
July 27, 2018 14:05
-
-
Save systemnate/4965ed6ff1b3a6ae81ebdabd0939028d 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 | |
filetype off | |
set background=light | |
colorscheme solarized | |
runtime macros/matchit.vim | |
let mapleader= " " | |
set tabstop=2 | |
set shiftwidth=2 | |
set shiftround | |
set expandtab | |
set backspace=2 " Backspace deletes like most programs in insert mode | |
set nobackup | |
set nowritebackup | |
set noswapfile " http://robots.thoughtbot.com/post/18739402579/global-gitignore#comment-458413287 | |
set history=50 | |
set ruler " show the cursor position all the time | |
set showcmd " display incomplete commands | |
set incsearch " do incremental searching | |
set laststatus=2 " Always display the status line | |
set autowrite " Automatically :write before running commands | |
set shiftwidth=2 | |
set shiftround | |
set number | |
set relativenumber | |
set hlsearch | |
" Open new split panes to right and bottom, which feels more natural | |
set splitbelow | |
set splitright | |
set t_Co=256 | |
set winwidth=100 | |
" Treat <li> and <p> tags like the block tags they are | |
let g:html_indent_tags = 'li\|p' | |
" let g:rspec_command = "!clear && spring rspec {spec}" | |
filetype plugin indent on | |
" Switch syntax highlighting on, when the terminal has colors | |
" Also switch on highlighting the last used search pattern. | |
if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on") | |
syntax on | |
endif | |
" Display extra whitespace | |
set list listchars=tab:»·,trail:·,nbsp:· | |
" Use The Silver Searcher https://github.com/ggreer/the_silver_searcher | |
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 -Q -l --nocolor --hidden -g "" %s' | |
" ag is fast enough that CtrlP doesn't need to cache | |
let g:ctrlp_use_caching = 0 | |
if !exists(":Ag") | |
command -nargs=+ -complete=file -bar Ag silent! grep! <args>|cwindow|redraw! | |
nnoremap \ :Ag<SPACE> | |
endif | |
endif | |
" When the type of shell script is /bin/sh, assume a POSIX-compatible | |
" shell for syntax highlighting purposes. | |
let g:is_posix = 1 | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'flazz/vim-colorschemes' | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'joukevandermaas/vim-ember-hbs' | |
Plugin 'tpope/vim-repeat' | |
Plugin 'tpope/vim-surround' | |
Plugin 'tpope/vim-dispatch' | |
Plugin 'tpope/vim-haml' | |
Plugin 'thoughtbot/vim-rspec' | |
Plugin 'ervandew/supertab' | |
Plugin 'kana/vim-textobj-user' | |
Plugin 'nelstrom/vim-textobj-rubyblock' | |
Plugin 'tpope/vim-cucumber' | |
Plugin 'scrooloose/syntastic' | |
Plugin 'posva/vim-vue' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'tpope/vim-rvm' | |
Plugin 'Lokaltog/vim-easymotion' | |
Plugin 'mattn/emmet-vim' | |
Plugin 'tpope/vim-rails.git' | |
Plugin 'vim-scripts/The-NERD-Commenter' | |
Plugin 'godlygeek/tabular' | |
Plugin 'plasticboy/vim-markdown' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'kchmck/vim-coffee-script' | |
Plugin 'L9' | |
Plugin 'slim-template/vim-slim.git' | |
Plugin 'ctrlpvim/ctrlp.vim' | |
Plugin 'JulesWang/css.vim' | |
Plugin 'cakebaker/scss-syntax.vim' | |
Plugin 'isRuslan/vim-es6' | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'airblade/vim-gitgutter' | |
call vundle#end() | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_auto_loc_list = 1 | |
let g:syntastic_check_on_open = 1 | |
let g:syntastic_check_on_wq = 0 | |
map <Leader>t :call RunCurrentSpecFile()<CR> | |
map <Leader>s :call RunNearestSpec()<CR> | |
map <Leader>l :call RunLastSpec()<CR> | |
map <Leader>a :call RunAllSpecs()<CR> | |
let g:user_emmet_install_global = 0 | |
let g:user_emmet_mode='iv' | |
let g:indent_guides_guide_size = 1 | |
" autocmd FileType html,css,eruby EmmetInstall | |
set completefunc=syntaxcomplete#Complete | |
map <silent><F8> :NERDTree<CR> | |
map <leader>r :NERDTreeFind<cr> | |
map <leader>e :NERDTreeToggle<cr> | |
map <leader>y :w !pbcopy<CR><CR> | |
autocmd BufNewFile,BufRead *.coffee set filetype=coffee | |
autocmd BufNewFile,BufRead *.slim set filetype=slim | |
autocmd BufNewFile,BufRead *.es6 set filetype=javascript | |
autocmd BufRead,BufNewFile *.vue set filetype=vue | |
let g:ctrlp_map = '<c-p>' | |
let g:ctrlp_cmd = 'CtrlP' | |
set wildignore+=*/tmp/*,*.so,*.swp,*.zip | |
let g:ctrlp_custom_ignore = '\v[\/]\.(DS_Store|git|hg|svn)|(optimized|compiled|node_modules|bower_compenents)$' | |
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard'] | |
map <c-o> :CtrlPBuffer<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment