Created
January 26, 2021 19:46
-
-
Save chrisbarless/aac80f5ea7cf01f36be1ebbad40b12d9 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
" Colors | |
syntax enable | |
syntax sync fromstart | |
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" | |
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" | |
" set termguicolors | |
" Plug 'lifepillar/vim-solarized8' | |
" set background=dark | |
" colorscheme solarized8 | |
" Indenting | |
filetype plugin indent on | |
" Show the current command as it's typed | |
set showcmd | |
" Make backspace work on OS/X | |
set backspace=indent,eol,start | |
" show existing tab with 2 spaces width | |
set tabstop=2 | |
" when indenting with '>', use 2 spaces width | |
set shiftwidth=2 | |
" On pressing tab, insert 2 spaces | |
set expandtab | |
" Display line numbers | |
set number | |
" Word wrap off | |
set nowrap | |
" Highlighting | |
set hls | |
" Make hidden files easily | |
set hidden | |
" Turn off SafeWrite for some live reloaders | |
set backupcopy=yes | |
" CtrlP | |
" OS/X Beeping | |
set noerrorbells visualbell t_vb= | |
if has('autocmd') | |
autocmd GUIEnter * set visualbell t_vb= | |
endif | |
" Search for visually selected text | |
" http://vim.wikia.com/wiki/Search_for_visually_selected_text | |
vnoremap // y/<C-R>"<CR> | |
" vim-plug | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
endif | |
""" Plugins | |
call plug#begin('~/.vim/plugged') | |
Plug 'altercation/vim-colors-solarized' | |
let &t_Co=256 | |
set background=dark | |
colorscheme solarized | |
" Quality of Life | |
Plug 'benmills/vimux' | |
map <Leader>rb :call VimuxRunCommand("clear; rspec " . bufname("%"))<CR> | |
Plug 'jtdowney/vimux-cargo' | |
Plug 'tpope/vim-sensible' | |
Plug 'xolox/vim-misc' | |
Plug 'tpope/vim-repeat' | |
Plug 'tpope/vim-unimpaired' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-fugitive' | |
Plug 'tpope/vim-rhubarb' | |
" Plug 'tpope/vim-abolish' | |
Plug 'adelarsq/vim-matchit' | |
Plug 'tpope/vim-commentary' | |
" Plug 'rizzatti/dash.vim' | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'PeterRincker/vim-argumentative' | |
" Plug 'junegunn/vim-easy-align' | |
Plug 'zxqfl/tabnine-vim' | |
" Plug 'easymotion/vim-easymotion' | |
" Plug 'svermeulen/vim-easyclip' | |
Plug 'tommcdo/vim-exchange' | |
Plug 'airblade/vim-gitgutter' | |
Plug 'jeffkreeftmeijer/vim-numbertoggle' | |
" Plug 'gcmt/taboo.vim' | |
" Plug 'vim-airline/vim-airline' | |
Plug 'itchyny/lightline.vim' | |
set noshowmode | |
let g:lightline = { | |
\ 'colorscheme': 'solarized', | |
\ 'active': { | |
\ 'left': [ [ 'mode', 'paste' ], | |
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ] | |
\ }, | |
\ 'component_function': { | |
\ 'gitbranch': 'FugitiveHead' | |
\ }, | |
\ } | |
" FZF | |
Plug '/usr/local/opt/fzf' | |
Plug 'junegunn/fzf.vim' | |
" nnoremap <silent> <c-p> :GitFiles<cr> | |
" nnoremap <silent> <leader>a :Buffers<CR> | |
" nnoremap <silent> <leader>A :Windows<CR> | |
Plug 'szw/vim-g' | |
let g:vim_g_command = "Go" | |
Plug 'mattn/emmet-vim' | |
let g:user_emmet_leader_key='<C-Y>' | |
Plug 'w0rp/ale' | |
let g:ale_linters = { | |
\ 'javascript': ['prettier', 'eslint'], | |
\ 'rust': ['cargo'], | |
\} | |
let g:ale_fixers = { | |
\ '*': ['remove_trailing_lines', 'trim_whitespace'], | |
\ 'javascript': ['prettier', 'eslint'], | |
\ 'css': ['prettier'], | |
\ 'scss': ['prettier'], | |
\ 'markdown': ['prettier'], | |
\ 'html': ['prettier'], | |
\ 'json': ['prettier'], | |
\ 'python': ['black'] | |
\} | |
let g:ale_python_auto_pipenv = 1 | |
let g:ale_fix_on_save = 1 | |
let g:ale_javascript_prettier_options = '--no-bracket-spacing' | |
" let g:ale_python_black_use_global = 1 | |
" let g:ale_python_mypy_auto_pipenv = 1 | |
" let g:ale_cache_executable_check_failures = 1 | |
" let g:ale_javascript_eslint_executable = 'eslint' | |
" let g:ale_javascript_eslint_use_global = 0 | |
" let g:ale_javascript_flow_executable = 'flow' | |
" let g:ale_javascript_flow_use_global = 0 | |
" Wrap long messages | |
autocmd FileType qf setlocal wrap | |
" let g:ale_set_loclist = 0 | |
" let g:ale_set_quickfix = 1 | |
" let g:ale_open_list = 1 | |
" let g:ale_keep_list_window_open = 0 | |
nmap <silent> <C-k> <Plug>(ale_previous_wrap) | |
nmap <silent> <C-j> <Plug>(ale_next_wrap) | |
" let g:ale_sign_error = '' | |
" let g:ale_sign_warning = '' | |
""" Languages | |
Plug 'rust-lang/rust.vim' | |
let g:rustfmt_autosave = 1 | |
" Plug 'pangloss/vim-javascript' | |
" Plug 'leafgarland/typescript-vim' | |
" Plug 'peitalin/vim-jsx-typescript' | |
" Plug 'mxw/vim-jsx' | |
Plug 'sheerun/vim-polyglot' | |
call plug#end() | |
let g:plug_window = 'vertical new' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment