mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim] adjust formatoptions (again)
This commit is contained in:
parent
7eeb36c136
commit
1460f41211
1 changed files with 6 additions and 1 deletions
|
@ -220,11 +220,16 @@ set commentstring=//%s
|
||||||
" Formatting {{{
|
" Formatting {{{
|
||||||
|
|
||||||
" -o: don't insert a comment after hitting 'o' or 'O' in the Normal mode
|
" -o: don't insert a comment after hitting 'o' or 'O' in the Normal mode
|
||||||
|
" +r: however, insert a comment after pressing Enter in the Insert mode
|
||||||
" -t: don't auto-wrap regular code while typing
|
" -t: don't auto-wrap regular code while typing
|
||||||
" -c: don't auto-wrap comments while typing
|
" -c: don't auto-wrap comments while typing
|
||||||
augroup vimrc-editing-formatting
|
augroup vimrc-editing-formatting
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd FileType * set formatoptions-=o | set formatoptions-=t | set formatoptions-=c
|
autocmd FileType *
|
||||||
|
\ setlocal formatoptions-=o
|
||||||
|
\|setlocal formatoptions+=r
|
||||||
|
\|setlocal formatoptions-=t
|
||||||
|
\|setlocal formatoptions-=c
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue