From 54b0f0d4ee2817e7c965fbb5d0b275052fb7b083 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 20 Mar 2019 16:09:48 +0100 Subject: [PATCH] automatically install plugins, add qol changes --- .config/nvim/init.vim | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 9eefd79..897fc66 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -21,6 +21,12 @@ if empty(glob('~/.vim/autoload/plug.vim')) autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif +" automatically install any missing plugins +autocmd VimEnter * + \ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) + \| PlugInstall --sync | q + \| endif + " defines plugin directory " Install plugins from vim with :PlugInstall silent! if plug#begin('~/.local/share/nvim/plugged') @@ -115,10 +121,7 @@ let g:ale_fixers = { " set truecolor (neovim) set termguicolors -" many of these come from -" http://stevelosh.com/blog/2010/09/coming-home-to-vim/ - -" sets tabs to be 4 characters, expanded into spaces, but still removable with +" sets tabs to be 2 characters, expanded into spaces, but still removable with " one press of backspace. " great explanation: http://vimcasts.org/transcripts/2/en/ set tabstop=2 @@ -126,9 +129,13 @@ set shiftwidth=2 set softtabstop=2 set expandtab +" set cursor line highlighting, esp useful when using with bracket +" highlighting and you don't know which side of the brace the cursor is on +set cursorline + " shows linenumbers relative to the one you are on, for easy movement and " dNUMBERd deletions -set relativenumber +set number relativenumber " keeps an undofile next to files so that you can even undo if vim is closed " in between