" Basics set nocompatible set title set number set scrolloff=2 set backspace=indent,eol,start set nowrap set noerrorbells set belloff=all set hlsearch set incsearch set signcolumn=yes set hidden set nobackup set nowritebackup set cmdheight=2 set shortmess+=c set path=$PWD/** set showmode set ignorecase set relativenumber set clipboard=unnamed " Default tabs & spaces set tabstop=2 set shiftwidth=2 set softtabstop=2 set expandtab set shiftround set smarttab set smartcase set smartindent set autoindent set copyindent set cursorline " Spellcheck me autocmd FileType gitcommit setlocal spell autocmd FileType markdown,md,mdx setlocal spell " Line wrap when writing autocmd FileType markdown,md,mdx,text set wrap " Drill Sergeant Demchuk noremap noremap noremap noremap inoremap inoremap inoremap inoremap " Make moving between splits easier nnoremap nnoremap nnoremap nnoremap " Plugins call plug#begin('~/.vim/plugged') Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'sheerun/vim-polyglot' Plug 'tpope/vim-commentary' Plug 'tpope/vim-fugitive' Plug 'tpope/vim-rhubarb' Plug 'tpope/vim-surround' Plug 'Rigellute/rigel' call plug#end() " netrw let g:netrw_banner = 0 " BEGIN auto-pairs let g:AutoPairsMultilineClose = 0 " END auto-pairs " BEGIN CoC let g:coc_global_extensions = [ \ 'coc-tsserver', \ 'coc-json', \ ] " Add eslint/prettier if installed. if isdirectory('./node_modules') && isdirectory('./node_modules/prettier') let g:coc_global_extensions += ['coc-prettier'] endif if isdirectory('./node_modules') && isdirectory('./node_modules/eslint') let g:coc_global_extensions += ['coc-eslint'] endif nnoremap K :call CocAction('doHover') " Use and to navigate autocomplete list. inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" " likes to insert another return when selecting items in the autocomplete " list. This gets around that, somehow... inoremap pumvisible() ? coc#_select_confirm() : "\" " GoTo code navigation. nmap gd (coc-definition) nmap gy (coc-type-definition) nmap gi (coc-implementation) nmap gr (coc-references) " Helps with coc-pairs, nicely formats when using brackets {}, (), etc. inoremap pumvisible() ? coc#_select_confirm() \: "\u\\=coc#on_enter()\" autocmd FileType markdown let b:coc_pairs_disabled = ['`'] " END CoC " BEGIN coc-prettier command! -nargs=0 Prettier :CocCommand prettier.formatFile " END coc-prettier " BEGIN fzf " Ignores files in .gitignore but includes untracked files. " Reference: https://github.com/junegunn/fzf.vim/issues/121#issuecomment-575922206 nnoremap :GFiles --cached --others --exclude-standard nnoremap :Ag "END fzf " Theme set statusline=%f%=%m%r%h%w%y[%04l,%04v] set termguicolors syntax enable colorscheme rigel highlight Comment cterm=italic gui=italic