From 84a5ec8ee9e14617c9a8df2772fbb28b650221cf Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Thu, 8 Oct 2020 11:10:25 +0530 Subject: [PATCH] nvim: Switch to better-whitespace Might be better as it is faster for the common case. See comment, https://github.com/axelf4/vim-strip-trailing-whitespace/issues/2#issuecomment-573422150 --- nvim/.config/nvim/init.vim | 2 +- nvim/.config/nvim/plugin_settings.vim | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index e60b0ca..92dd8ea 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -9,7 +9,7 @@ Plug 'PeterRincker/vim-searchlight' Plug 'wincent/ferret' Plug 'lambdalisue/reword.vim' " Remove extraneous whitespace when edit mode is exited -Plug 'axelf4/vim-strip-trailing-whitespace' +Plug 'ntpeters/vim-better-whitespace' " Manage Project sessions Plug 'thaerkh/vim-workspace' " For autocompletion diff --git a/nvim/.config/nvim/plugin_settings.vim b/nvim/.config/nvim/plugin_settings.vim index 1814703..eece558 100644 --- a/nvim/.config/nvim/plugin_settings.vim +++ b/nvim/.config/nvim/plugin_settings.vim @@ -1,3 +1,8 @@ +" Better whitespace +let g:better_whitespace_enabled = 1 +let g:strip_whitespace_on_save = 1 +let g:better_whitespace_operator = '' +let g:strip_whitespace_confirm = 0 " Automatically detect style file and apply style to formatting let g:clang_format#detect_style_file = 1 " For workspace