diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-20 22:47:15 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-20 22:47:37 +1200 |
commit | 22e7edc534dfb05d3914facd262b1dcfd651b4cb (patch) | |
tree | dd0b1aa554fa49719ae36a76890827e5143b8af2 /vim | |
parent | Simplify .vim 'paste' and 'pastetoggle' settings (diff) | |
download | dotfiles-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.
Diffstat (limited to 'vim')
-rw-r--r-- | vim/vimrc | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -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 |