aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-07 10:10:44 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-07 11:51:07 +1300
commit35dbef982a4040158aee506873825c5d2f8db4f6 (patch)
treedec7ca15c7f1a01187292d2cf81ce87861b874a6
parentdc0ab08ed472c4db827360bfc9f5959e675a6c8a (diff)
downloaddotfiles-35dbef982a4040158aee506873825c5d2f8db4f6.tar.gz
Bind <Leader>f to show current 'formatoptions'
I think this option has become overloaded in recent versions and that these would make more sense and be more manageable as separate but interacting options.
-rw-r--r--vim/config/format.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/vim/config/format.vim b/vim/config/format.vim
index e266f42a..e1da2d0b 100644
--- a/vim/config/format.vim
+++ b/vim/config/format.vim
@@ -2,6 +2,11 @@
" leaders when joining lines
silent! set formatoptions+=j
+" Show the current formatoptions at a glance
+noremap <silent>
+ \ <Leader>f
+ \ :<C-U>setlocal formatoptions?<CR>
+
" Use toggle_option_flag.vim plugin to bind quick toggle actions for some
" 'formatoptions' flags
if has('user_commands')