aboutsummaryrefslogtreecommitdiff
path: root/plugin/toggle_flags.vim
blob: f300666d73f4fd15ffba2032e10b45260193a8b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"
" toggle_flags.vim: Provide commands to toggle flags in grouped options like
" 'formatoptions', 'shortmess', 'complete', 'switchbuf', etc.
"
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
if exists('loaded_toggle_flags') || &compatible
  finish
endif
if v:version < 700
  finish
endif
let loaded_toggle_flags = 1

" User commands wrapping around calls to the above function
command -nargs=+ -complete=option
      \ ToggleFlag
      \ call toggle_flags#Toggle(<f-args>, 0)
command -nargs=+ -complete=option
      \ ToggleFlagLocal
      \ call toggle_flags#Toggle(<f-args>, 1)