"************************** "Defaults set exrc set nohlsearch set incsearch set relativenumber set number set encoding=utf-8 set colorcolumn=81 highlight ColorColumn ctermbg=lightgrey guibg=lightgrey set noswapfile set nobackup set undodir=~/.vim/undodir set undofile "Tabbing set autoindent tabstop=4 shiftwidth=4 "File specific "************************** "Commands command JsonFormat :%!python3 -m json.tool "************************** "Key Remaps let mapleader = " " "Window management nnoremap w nnoremap ws :vsp nnoremap wi :sp nnoremap wt :tabnew "Vim stuff nnoremap fs :w nnoremap fer :source ~/.config/nvim/init.vim nnoremap r :registers:normal! "p nnoremap p :set paste! nnoremap c "+ vnoremap c "+ "************************** " Bracket completion inoremap { {}O inoremap [ [] inoremap { {} inoremap {{ {{}} inoremap ({ ({})O inoremap ( () inoremap {) {});O "************************** " Plugins call plug#begin(expand('~/.vim/plugged')) Plug 'editorconfig/editorconfig-vim' Plug 'alvan/vim-closetag' Plug 'tpope/vim-surround' Plug 'tpope/vim-commentary' Plug 'tpope/vim-fugitive' Plug 'jonsmithers/vim-html-template-literals', { 'branch': 'dev' } Plug 'godlygeek/tabular' Plug 'plasticboy/vim-markdown' Plug 'yuezk/vim-js' Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'neoclide/coc.nvim', { 'branch': 'release' } Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim' Plug 'kchmck/vim-coffee-script' call plug#end() "************************** " Plugin Configs "Telescope nnoremap ff Telescope find_files nnoremap Telescope find_files nnoremap fg Telescope live_grep nnoremap fb Telescope buffers nnoremap fh Telescope help_tags "Markdown autocmd FileType markdown set colorcolumn= "************************** " COC nmap gd (coc-definition) nmap gy (coc-type-definition) nmap gi (coc-implementation) nmap gr (coc-references) nmap rn (coc-rename) "************************** " Languages " Go autocmd BufWritePre *.go :silent call CocAction('runCommand', 'editor.action.organizeImport') " C/C++ autocmd BufWritePre *.h,*.hpp,*.c,*.cpp :call FormatBuffer()