Last active
June 19, 2020 13:36
-
-
Save dimanyc/9a2d18ce0f673430035ebdb182e35adc to your computer and use it in GitHub Desktop.
.vimrc as of 5/17/20
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, required | |
filetype off " required | |
call plug#begin('~/.vim/plugged') | |
Plug 'MaxMEllon/vim-jsx-pretty' | |
Plug 'danilo-augusto/vim-afterglow' | |
Plug 'dense-analysis/ale' | |
Plug 'jparise/vim-graphql' | |
Plug 'junegunn/fzf', { 'do': './install --bin' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'keith/rspec.vim' | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'ntpeters/vim-better-whitespace' | |
Plug 'pangloss/vim-javascript' | |
Plug 'sheerun/vim-polyglot' | |
Plug 'thoughtbot/vim-rspec' | |
Plug 'tomasr/molokai' | |
Plug 'tpope/vim-commentary' | |
Plug 'tpope/vim-dispatch' | |
Plug 'tpope/vim-fugitive' | |
Plug 'tpope/vim-liquid' | |
Plug 'tpope/vim-repeat' | |
Plug 'tpope/vim-surround' | |
Plug 'vim-airline/vim-airline' | |
Plug 'yuezk/vim-js' | |
call plug#end() | |
" ALE Config: | |
" let g:ale_sign_error = '❌' | |
" let g:ale_sign_warning = '⚠️' | |
let g:ale_fixers = { | |
\ 'ruby': ['rubocop'], | |
\ 'rspec.ruby': ['rubocop'], | |
\ 'scss': ['prettier'], | |
\ 'python': ['autopep8'], | |
\ 'javascript': ['prettier', 'eslint'], | |
\ 'javascriptreact': ['prettier', 'eslint'], | |
\ 'typescript': ['tslint'], | |
\ 'typescriptreact': ['tslint', 'prettier', 'eslint'], | |
\ 'html': ['prettier'], | |
\ 'eruby': ['rubocop'], | |
\ 'yaml': ['prettier'], | |
\ '*': ['remove_trailing_lines', 'trim_whitespace'] | |
\} | |
let g:ale_linters = { | |
\ 'ruby': ['rubocop'], | |
\ 'rspec.ruby': ['rubocop'], | |
\ 'scss': ['prettier'], | |
\ 'python': ['flake8'], | |
\ 'javascript': ['eslint'], | |
\ 'javascriptreact': ['eslint'], | |
\ 'typescript': ['tslint'], | |
\ 'typescriptreact': ['eslint', 'tslint'], | |
\ 'eruby': ['rubocop'], | |
\ 'yaml': ['prettier'], | |
\ 'html': ['prettier'] | |
\} | |
" let g:ale_javascript_prettier_use_local_config = 1 | |
" let g:ale_linters_explicit = 1 | |
" " let g:ale_fix_on_save = 0 | |
" " let g:ale_ruby_rubocop_executable="bundle exec rubocop" | |
" " let g:ale_ruby_rubocop_executable = 'bundle exec rubocop' | |
nmap <silent> <leader>d <Plug>(ale_fix) | |
" FZF Config: | |
nnoremap <C-p> :Files<CR> | |
nnoremap <Leader>b :Buffers<CR> | |
nnoremap <Leader>h :History<CR> | |
" Colorscheme: | |
let g:molokai_original = 1 | |
let g:rehash256 = 1 | |
set background=dark | |
colorscheme afterglow | |
syntax enable | |
colorscheme molokai | |
set number | |
set noswapfile | |
set clipboard=unnamed | |
set cmdheight=1 | |
set backspace=indent,eol,start | |
" Indentation | |
set autoindent | |
set tabstop=2 | |
set expandtab | |
set shiftwidth=2 | |
" Spelling | |
set spelllang=en | |
set spellfile=$HOME/Dropbox/vim/spell/en.utf-8.add | |
set spell | |
" Parens | |
autocmd FocusLost * :NoMatchParen | |
autocmd FocusGained * :DoMatchParen | |
hi MatchParen ctermfg=014 ctermbg=208 cterm=bold | |
nmap <silent> <Leader>e :Explore<CR> | |
autocmd FileType javascript.jsx setlocal commentstring={/*\ %s\ */} | |
" Rspec: | |
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:rspec_command = "!bundle exec rspec {spec} " | |
" Whitespace: | |
let g:strip_whitespace_on_save=1 | |
let g:strip_whitespace_confirm=0 | |
nmap <leader>gd <Plug>(coc-definition) | |
nmap <leader>gr <Plug>(coc-references) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment