aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-20 22:47:15 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-20 22:47:37 +1200
commit22e7edc534dfb05d3914facd262b1dcfd651b4cb (patch)
treedd0b1aa554fa49719ae36a76890827e5143b8af2
parentSimplify .vim 'paste' and 'pastetoggle' settings (diff)
downloaddotfiles-22e7edc534dfb05d3914facd262b1dcfd651b4cb.tar.gz
dotfiles-22e7edc534dfb05d3914facd262b1dcfd651b4cb.zip
Reduce 'formatoptions' flag toggling to just 'a'
The other three that I've removed are almost certainly better in filetype plugins.
-rw-r--r--vim/vimrc13
1 files changed, 2 insertions, 11 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 2ac81c8c..2f2b8a52 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -388,19 +388,10 @@ nmap <Leader>b <Plug>CopyLinebreakToggle
" \x strips trailing whitespace via a custom plugin
nmap <Leader>x <Plug>StripTrailingWhitespace
-" Use toggle_option_flag.vim plugin to bind quick toggle actions for some
-" 'formatoptions' flags
+" \a toggles 'f' flag in 'formatoptions' to reformat paragraphs to 'textwidth'
+" on all insert or delete operations
if has('user_commands')
-
- " \a: Reformat paragraphs to 'textwidth' on all insert or delete operations
nnoremap <Leader>a :<C-U>ToggleOptionFlagLocal formatoptions a<CR>
- " \c: Reformat comments to 'textwidth'
- nnoremap <Leader>c :<C-U>ToggleOptionFlagLocal formatoptions c<CR>
- " \j: Delete comment leaders when joining lines
- nnoremap <Leader>j :<C-U>ToggleOptionFlagLocal formatoptions j<CR>
- " \t: Reformat non-comment text to 'textwidth'
- nnoremap <Leader>t :<C-U>ToggleOptionFlagLocal formatoptions t<CR>
-
endif
" Add the packaged version of matchit.vim included in the distribution, if