aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc6
1 files 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 <silent> ZA :<C-U>wall!<CR>
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 <silent> <Leader>f :<C-U>setlocal formatoptions?<CR>