From a4484bd1444f51154840fe2be12e9dde6414d1ec Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 26 Jul 2018 09:42:15 +1200 Subject: Move NeoVim-specific config to subfile --- Makefile | 5 +++-- vim/nvim.vim | 7 +++++++ vim/vimrc | 11 +++++------ 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 vim/nvim.vim diff --git a/Makefile b/Makefile index acf0bab7..a19e87d8 100644 --- a/Makefile +++ b/Makefile @@ -511,8 +511,9 @@ install-vim: install-vim-after \ install-neovim: make install-vim \ VIM=nvim \ - VIMDIR=$${XDG_CONFIG_HOME:-"$$HOME"/.config}/nvim \ - VIMRC=$${XDG_CONFIG_HOME:="$$HOME"/.config}/nvim/init.vim + VIMDIR="$${XDG_CONFIG_HOME:-"$$HOME"/.config}/nvim" \ + VIMRC="$${XDG_CONFIG_HOME:="$$HOME"/.config}/nvim/init.vim" + cp -p -- vim/nvim.vim "$${XDG_CONFIG_HOME:-"$$HOME"/.config}/nvim" install-vim-after: install-vim-after-ftplugin \ install-vim-after-indent \ diff --git a/vim/nvim.vim b/vim/nvim.vim new file mode 100644 index 00000000..3ad54f57 --- /dev/null +++ b/vim/nvim.vim @@ -0,0 +1,7 @@ +" Configuration specific to NeoVim + +" Don't show a statusline if there's only one window +set laststatus=1 + +" Disable command line display of file position +set noruler diff --git a/vim/vimrc b/vim/vimrc index cd8b0293..1ffb3e09 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -98,9 +98,6 @@ set incsearch " Don't join lines with two spaces at the end of sentences set nojoinspaces -" Don't show a statusline if there's only one window -set laststatus=1 - " Don't redraw the screen during batch execution set lazyredraw @@ -124,9 +121,6 @@ set nrformats-=octal set path-=/usr/include " Let the C/C++ filetypes set that set path+=** " Search current directory's whole tree -" Disable the ruler -set noruler - " Don't show startup splash screen (I donated) set shortmess+=I @@ -300,5 +294,10 @@ nnoremap :bdelete " \INS edits a new buffer nnoremap :enew +" If we're running NeoVim, source some extra configuration +if has('nvim') + runtime nvim.vim +endif + " Source any .vim files from ~/.vim/config runtime! config/*.vim -- cgit v1.2.3