vim: Automatic formatting
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
" Shorter lines. Subject should be max 50 and body max 72
|
" Shorter lines. Subject should be max 50 and body max 72
|
||||||
setlocal colorcolumn=50,72
|
setlocal colorcolumn=50,72
|
||||||
|
setlocal textwidth=72
|
||||||
" Spell checking always enabled
|
" Spell checking always enabled
|
||||||
setlocal spell spelllang=en
|
setlocal spell spelllang=en
|
||||||
|
|||||||
@@ -24,8 +24,12 @@ set tabstop=4
|
|||||||
set shiftwidth=0
|
set shiftwidth=0
|
||||||
" Highlight current line
|
" Highlight current line
|
||||||
set cursorline
|
set cursorline
|
||||||
" Automatically add leading comment (when pressing o/O or enter in Insert)
|
" Auto-wrap text and comments; automatically add comment leader when creating
|
||||||
set formatoptions+=cro
|
" new lines and delete it when joining; do not break already too long lines;
|
||||||
|
" allow formatting with gq.
|
||||||
|
set formatoptions=tcroqlj
|
||||||
|
" Keep lines under 80 characters.
|
||||||
|
set textwidth=80
|
||||||
" see :help persistent-undo
|
" see :help persistent-undo
|
||||||
set undofile
|
set undofile
|
||||||
" Update every 300ms for better experience with plugins like gitgutter and coc
|
" Update every 300ms for better experience with plugins like gitgutter and coc
|
||||||
|
|||||||
Reference in New Issue
Block a user