diff --git a/README.md b/README.md index 4e25a845a58cb9bfb368e25a48e71428a56e5511..89f610bd9e26a86f07208f2977074508dade32fc 100644 --- a/README.md +++ b/README.md @@ -309,6 +309,12 @@ Git command, may be simply simply "git" if git is in your path. Defualt is "git" To disable chatty inline help in magit buffer (default 1) > let g:magit_show_help=[01] +#### g:magit_commit_title_limit + +Text is grayed if first line of commit message exceed this number of character (default 50) + +> let g:magit_commit_title_limit=[0..300] + #### g:magit_default_show_all_files When this variable is set to 0, all diff files are hidden by default. diff --git a/doc/vimagit.txt b/doc/vimagit.txt index 365aca8d5d28c529f4fb32de0752732177930d14..da1ed93b005a17c93966772a16ac45f4c238c454 100644 --- a/doc/vimagit.txt +++ b/doc/vimagit.txt @@ -351,6 +351,13 @@ let g:magit_git_cmd="git" To disable chatty inline help in magit buffer (default 1) let g:magit_show_help=[01] + *vimagit-g:magit_commit_title_limit* + +Text is grayed if first line of commit message exceed this number of character +(default 50) + +let g:magit_commit_title_limit=[0..300] + *vimagit-g:magit_default_show_all_files* When this variable is set to 0, all diff files are hidden by default. When this variable is set to 1, all diff for modified files are shown by default. diff --git a/plugin/magit.vim b/plugin/magit.vim index 4ef991e40bad9d958fbbd2f8414589d56767afbf..5506cc7715210dbba5eb7cfcb8ad7d67899a8514 100644 --- a/plugin/magit.vim +++ b/plugin/magit.vim @@ -59,6 +59,9 @@ let g:magit_discard_untracked_do_delete = get(g:, 'magit_discard_untracked_do_de let g:magit_refresh_gutter = get(g:, 'magit_refresh_gutter' , 1) " Should deprecate the following let g:magit_refresh_gitgutter = get(g:, 'magit_refresh_gitgutter', 0) + +let g:magit_commit_title_limit = get(g:, 'magit_commit_title_limit', 50) + let g:magit_warning_max_lines = get(g:, 'magit_warning_max_lines', 10000) let g:magit_git_cmd = get(g:, 'magit_git_cmd' , "git") diff --git a/syntax/magit.vim b/syntax/magit.vim index fb74de7de30f8dc9bcc5db8fc55aeb15e4f4b112..b438072effff5ec6ab07d0793c2bf9a7a6bcc628 100644 --- a/syntax/magit.vim +++ b/syntax/magit.vim @@ -13,7 +13,7 @@ syn include @diff syntax/diff.vim execute 'syn match titleEntry "' . g:magit_section_re . '\n=\+"' hi def link titleEntry Comment -execute 'syn match commitMsgExceed "\(=\+\n.\{50}\)\@<=.*$"' +execute 'syn match commitMsgExceed "\(=\+\n.\{' . g:magit_commit_title_limit . '}\)\@<=.*$"' hi def link commitMsgExceed Comment execute 'syn match stashEntry "' . g:magit_stash_re . '"'