From 2560a05fe5b46c857670605e9889b2e7fadfc6f1 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 13 Jun 2018 10:55:20 +1200 Subject: Use proper version test for 'fo' j --- vim/vimrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index a2363e88..185df60d 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -185,8 +185,10 @@ nnoremap ZA :wall! set nrformats-=octal " Try to set the 'j' flag for 'formatoptions', to automatically delete comment -" leaders when joining lines -silent! set formatoptions+=j +" leaders when joining lines, if supported +if v:version >= 704 || v:version == 703 && has('patch541') + set formatoptions+=j +endif " \f shows the current formatoptions at a glance nnoremap f :setlocal formatoptions? -- cgit v1.2.3