Skip to content

Commit

Permalink
vimrc: set linebreak option for diff and git filetypes.
Browse files Browse the repository at this point in the history
I didn't like seeing words split across lines in commit messages with long lines.
  • Loading branch information
shaneharper committed Oct 31, 2023
1 parent d67b81a commit b19b4f0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,7 @@ augroup vimrc_miscellaneous
autocmd BufNewFile *.py 0put =\"#!/usr/bin/env python3\"|normal G
autocmd BufNewFile,BufRead,BufWrite *.vim+ if !exists('b:current_syntax') | setfiletype vim | endif " See: https://github.com/shaneharper/add_vim_script_end_statements
autocmd BufNewFile,BufRead,BufWrite *.xaml setfiletype xml
autocmd FileType text,markdown,hgcommit,gitcommit set linebreak wrap
autocmd FileType diff,git set wrap
autocmd FileType diff,git,gitcommit,hgcommit,markdown,text set linebreak wrap
autocmd BufNewFile,BufRead,BufWrite *.swg setfiletype swig
autocmd BufWinEnter * call <SID>set_formatoptions_for_buffer() " This autocmd is executed after ftplugin scripts have run. (This way we can override unwanted formatoptions settings that may have been made by an ftplugin script.)
autocmd BufNewFile,BufRead,BufWrite .clang-tidy set filetype=yaml
Expand Down

0 comments on commit b19b4f0

Please sign in to comment.