aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-05 13:33:40 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-05 13:33:40 +1300
commitc74d2173b4ebf2168c6449c3050a2b6f1203baf6 (patch)
tree3028dfa27d366fd0ce268a1f522dbb98e386aaa9
parentMerge branch 'feature/vim-fo-opt-toggle' into develop (diff)
parentMove 'formatoptions-a' test near applicable block (diff)
downloaddotfiles-c74d2173b4ebf2168c6449c3050a2b6f1203baf6.tar.gz
dotfiles-c74d2173b4ebf2168c6449c3050a2b6f1203baf6.zip
Merge branch 'feature/vim-fo-a-ver' into develop
* feature/vim-fo-a-ver: Move 'formatoptions-a' test near applicable block Precisely define 'formatoptions' 'a' flag presence
-rw-r--r--vim/config/format.vim11
1 files changed, 6 insertions, 5 deletions
diff --git a/vim/config/format.vim b/vim/config/format.vim
index 61222164..54d46dc2 100644
--- a/vim/config/format.vim
+++ b/vim/config/format.vim
@@ -26,11 +26,6 @@ if has('eval')
finish
endif
- " Figure out if we have the 'a' flag for 'formatoptions', to reapply
- " 'textwidth' wrapping to the current paragraph on every insertion or
- " deletion; keep in a script variable
- let s:formatoptions_has_a = v:version > 700
-
" 'c' and 't' have both been around since at least 6.1
nnoremap <silent>
\ <Leader>c
@@ -39,6 +34,12 @@ if has('eval')
\ <Leader>t
\ :<C-U>ToggleOptionFlagLocal formatoptions t<CR>
+ " Figure out if we have the 'a' flag for 'formatoptions', to reapply
+ " 'textwidth' wrapping to the current paragraph on every insertion or
+ " deletion; keep in a script variable
+ let s:formatoptions_has_a = v:version > 610
+ \ || v:version ==# 610 && has('patch142')
+
" 'a' needs testing
if s:formatoptions_has_a
nnoremap <silent>