aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-13 10:55:20 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-13 10:55:20 +1200
commit2560a05fe5b46c857670605e9889b2e7fadfc6f1 (patch)
treed9909a1690167528bf5fe0e598c0cf51d2328187 /vim
parentCheck for +unix before binding date commands (diff)
downloaddotfiles-2560a05fe5b46c857670605e9889b2e7fadfc6f1.tar.gz
dotfiles-2560a05fe5b46c857670605e9889b2e7fadfc6f1.zip
Use proper version test for 'fo' j
Diffstat (limited to 'vim')
-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>