mirror of
https://github.com/amix/vimrc
synced 2025-06-23 06:35:01 +08:00
Updated plugins
This commit is contained in:
@ -234,6 +234,20 @@ gitgutter#fold#foldtext(): +-- 45 lines (*): abcdef
|
||||
You can use `gitgutter#fold#is_changed()` in your own `foldtext` expression to find out whether the folded lines have been changed.
|
||||
|
||||
|
||||
### Status line
|
||||
|
||||
Call the `GitGutterGetHunkSummary()` function from your status line to get a list of counts of added, modified, and removed lines in the current buffer. For example:
|
||||
|
||||
```viml
|
||||
" Your vimrc
|
||||
function! GitStatus()
|
||||
let [a,m,r] = GitGutterGetHunkSummary()
|
||||
return printf('+%d ~%d -%d', a, m, r)
|
||||
endfunction
|
||||
set statusline+=%{GitStatus()}
|
||||
```
|
||||
|
||||
|
||||
### Customisation
|
||||
|
||||
You can customise:
|
||||
|
@ -4,7 +4,7 @@ let s:hunk_re = '^@@ -\(\d\+\),\?\(\d*\) +\(\d\+\),\?\(\d*\) @@'
|
||||
|
||||
" True for git v1.7.2+.
|
||||
function! s:git_supports_command_line_config_override() abort
|
||||
call system(g:gitgutter_git_executable.' '.g:gitgutter_git_args.' -c foo.bar=baz --version')
|
||||
call gitgutter#utility#system(g:gitgutter_git_executable.' '.g:gitgutter_git_args.' -c foo.bar=baz --version')
|
||||
return !v:shell_error
|
||||
endfunction
|
||||
|
||||
|
@ -17,6 +17,7 @@ CONTENTS *gitgutter*
|
||||
Commands ..................... |gitgutter-commands|
|
||||
Mappings ..................... |gitgutter-mappings|
|
||||
Autocommand .................. |gitgutter-autocommand|
|
||||
Status line .................. |gitgutter-statusline|
|
||||
Options ...................... |gitgutter-options|
|
||||
Highlights ................... |gitgutter-highlights|
|
||||
FAQ .......................... |gitgutter-faq|
|
||||
@ -244,6 +245,23 @@ trailing empty lines.
|
||||
<
|
||||
|
||||
|
||||
===============================================================================
|
||||
STATUS LINE *gitgutter-statusline*
|
||||
|
||||
|
||||
Call the `GitGutterGetHunkSummary()` function from your status line to get a
|
||||
list of counts of added, modified, and removed lines in the current buffer.
|
||||
For example:
|
||||
>
|
||||
" Your vimrc
|
||||
function! GitStatus()
|
||||
let [a,m,r] = GitGutterGetHunkSummary()
|
||||
return printf('+%d ~%d -%d', a, m, r)
|
||||
endfunction
|
||||
set statusline+=%{GitStatus()}
|
||||
<
|
||||
|
||||
|
||||
===============================================================================
|
||||
OPTIONS *gitgutter-options*
|
||||
|
||||
|
Reference in New Issue
Block a user