Created
August 28, 2018 20:19
-
-
Save evantravers/55e226ba2e82494531bcc436c50eff39 to your computer and use it in GitHub Desktop.
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
" Load plug | |
call plug#begin('~/.config/nvim/bundle') | |
Plug 'airblade/vim-gitgutter' | |
Plug 'editorconfig/editorconfig-vim' | |
Plug 'gregsexton/MatchTag' | |
Plug 'honza/vim-snippets' | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': 'yes \| ./install --all' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'junegunn/vim-easy-align' | |
Plug 'junegunn/vim-plug' | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'kopischke/vim-fetch' | |
Plug 'mattn/emmet-vim', { 'for': 'html,erb,eruby' } | |
Plug 'mattn/gist-vim' | |
Plug 'mattn/webapi-vim' | |
Plug 'mileszs/ack.vim' | |
Plug 'morhetz/gruvbox' | |
Plug 'mtth/scratch.vim' | |
Plug 'tpope/vim-abolish' | |
Plug 'tpope/vim-endwise' | |
Plug 'tpope/vim-eunuch' | |
Plug 'tpope/vim-fugitive' | |
Plug 'tpope/vim-git' | |
Plug 'tpope/vim-markdown' | |
Plug 'tpope/vim-ragtag' | |
Plug 'tpope/vim-repeat' | |
Plug 'tpope/vim-rhubarb' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-unimpaired' | |
Plug 'tpope/vim-vinegar' | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'w0rp/ale' | |
call plug#end() | |
" Load plugins | |
filetype plugin indent on | |
"============================================= | |
" Options | |
"============================================= | |
" Color | |
set termguicolors | |
let g:gruvbox_bold=1 | |
let g:gruvbox_italic=1 | |
let g:gruvbox_underline=1 | |
let g:gruvbox_undercurl=1 | |
let g:gruvbox_contrast_dark='medium' | |
let g:gruvbox_contrast_light='hard' | |
let g:gruvbox_improved_strings=1 | |
let g:gruvbox_improved_warnings=1 | |
set background=dark | |
colorscheme gruvbox | |
syntax on | |
" Search | |
set ignorecase | |
set smartcase | |
" Tab completion | |
set wildmode=list:longest,full | |
set wildignore=*.swp,*.o,*.so,*.exe,*.dll | |
" Scroll | |
set scrolloff=3 | |
" Tab settings | |
set ts=2 | |
set sw=2 | |
set expandtab | |
" Hud | |
set ruler | |
set number | |
set nowrap | |
set fillchars=vert:\│ | |
set colorcolumn=80 | |
" Buffers | |
set hidden | |
" Backup Directories | |
set backupdir=~/.config/nvim/backups,. | |
set directory=~/.config/nvim/swaps,. | |
if exists('&undodir') | |
set undodir=~/.config/nvim/undo,. | |
endif | |
"============================================= | |
" Remaps | |
"============================================= | |
let mapleader=',' | |
let maplocalleader=',' | |
" Jump key | |
nnoremap ` ' | |
nnoremap ' ` | |
" Change pane | |
nnoremap <C-h> <C-w>h | |
nnoremap <C-j> <C-w>j | |
nnoremap <C-k> <C-w>k | |
nnoremap <C-l> <C-w>l | |
" Turn off search highlight | |
nnoremap <localleader>/ :nohlsearch<CR> | |
" Trim trailing whitespace | |
nnoremap <localleader>tw m`:%s/\s\+$//e<CR>`` | |
"============================================= | |
" Other Settings | |
"============================================= | |
" Use relative line numbers | |
set relativenumber | |
" Toggle paste mode | |
set pastetoggle=<leader>z | |
" Fancy tag lookup | |
set tags=./tags;/,tags;/ | |
" Fancy macros | |
nnoremap Q @q | |
vnoremap Q :norm @q<cr> | |
" Visible whitespace | |
set listchars=tab:»·,trail:· | |
set list | |
" Soft-wrap for prose | |
command! -nargs=* Wrap set wrap linebreak nolist spell | |
let &showbreak='↪ ' | |
"============================================= | |
" Package Settings | |
"============================================= | |
" junegunn/fzf | |
let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --glob "!.git/*"' | |
let g:fzf_action = { | |
\ 'ctrl-s': 'split', | |
\ 'ctrl-v': 'vsplit' | |
\ } | |
let g:fzf_colors = | |
\ { 'fg': ['fg', 'Normal'], | |
\ 'bg': ['bg', 'Normal'], | |
\ 'hl': ['fg', 'Comment'], | |
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], | |
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], | |
\ 'hl+': ['fg', 'Statement'], | |
\ 'info': ['fg', 'PreProc'], | |
\ 'border': ['fg', 'Ignore'], | |
\ 'prompt': ['fg', 'Conditional'], | |
\ 'pointer': ['fg', 'Exception'], | |
\ 'marker': ['fg', 'Keyword'], | |
\ 'spinner': ['fg', 'Label'], | |
\ 'header': ['fg', 'Comment'] } | |
nnoremap <c-p> :FZF<cr> | |
nnoremap <localleader><space> :Buffers<cr> | |
" junegunn/vim-easy-align | |
vmap <Enter> <Plug>(EasyAlign) | |
nmap <Leader>a <Plug>(EasyAlign) | |
" mileszs/ack.vim | |
let g:ackprg = 'rg --vimgrep --no-heading' | |
" vim-airline/vim-airline | |
let g:airline_powerline_fonts=1 | |
let g:bufferline_echo = 0 | |
let airline#extensions#default#section_use_groupitems = 0 | |
" vim-airline/vim-airline-themes | |
let g:airline_theme = 'gruvbox' | |
" w0rp/ale | |
let g:ale_lint_delay = 5000 | |
let g:ale_javascript_eslint_use_global = 1 | |
let g:ale_linters = {'javascript': ['eslint']} | |
" Horrible hack to work-around weird corrupted lines on window resize | |
" https://github.com/neovim/neovim/issues/7861 | |
autocmd VimResized * redraw! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment