1
0
mirror of https://github.com/amix/vimrc synced 2025-06-23 06:35:01 +08:00

Updated plugins

This commit is contained in:
Amir
2020-01-28 23:07:36 -03:00
parent 46195e4ca4
commit dbcdace7be
32 changed files with 644 additions and 664 deletions

File diff suppressed because it is too large Load Diff

View File

@ -16,14 +16,18 @@ These commands are local to the buffers in which they work (generally, buffers
that are part of Git repositories).
*:Git* *fugitive-:G*
:Git {args} Run an arbitrary git command. Similar to :!git [args]
:G {args} but chdir to the repository tree first. For some
subcommands, a Fugitive command is called instead.
:Git {args} Run an arbitrary git command and display any output.
:G {args} On UNIX this uses a pty and on other platforms it uses
a pipe, which will cause some behavior differences
such as the absence of progress bars. Any file the
command edits (for example, a commit message) will be
loaded into a split window. Closing that window will
resume running the command. A few Git subcommands
have different behavior; these are documented below.
*:Git!*
:Git! {args} Like |:Git|, but capture the output into a temp file,
:Git --no-pager {args} and |:split| that temp file. Use :0Git to
:Git -P {args} |:edit| the temp file instead. A temp file is always
:Git! {args} Run an arbitrary git command, capture output to a temp
:Git --paginate {args} file, and |:split| that temp file. Use :0Git to
:Git -p {args} |:edit| the temp file instead. A temp file is always
used for diff and log commands.
*:Gstatus*
@ -31,44 +35,6 @@ that are part of Git repositories).
:G Press g? or see |fugitive-maps| for usage.
:Gstatus
*:Git-commit* *:Gcommit*
:Git commit [args] A wrapper around git-commit. Unless the arguments
:Gcommit [args] given would skip the invocation of an editor (e.g.,
-m), a split window will be used to obtain a commit
message, or a new tab if -v is given. Write and close
the window (:wq) to finish the commit. To cancel, use
an empty message.
*:Git-revert* *:Grevert*
:Git revert [args] A wrapper around git-revert. Similar to |:Gcommit|.
:Grevert [args]
*:Git-merge* *:Gmerge*
:Git merge [args] Calls git-merge and loads errors and conflicted files
:Gmerge [args] into the |quickfix| list. Opens a |:Gcommit| style
split window for the commit message if the merge
succeeds. If called during a merge conflict, the
conflicted files from the current index are loaded
into the |quickfix| list.
*:Git-pull* *:Gpull*
:Git pull [args] Like |:Gmerge|, but for git-pull.
:Gpull [args]
*:Git-rebase* *:Grebase*
:Git rebase [args] Like |:Gmerge|, but for git-rebase. Interactive
:Grebase [args] rebase is experimentally supported.
*:Git-push* *:Gpush*
:Git push [args] Invoke git-push, load the results into the |quickfix|
:Gpush [args] list, and invoke |:cwindow| to reveal any errors.
|:Dispatch| is used if available for asynchronous
invocation.
*:Git-fetch* *:Gfetch*
:Git fetch [args] Like |:Gpush|, but for git-fetch.
:Gfetch [args]
*:Git-blame* *:Gblame*
:Git blame [flags] Run git-blame [flags] on the current file and open the
:Gblame [flags] results in a scroll-bound vertical split. The
@ -111,12 +77,39 @@ that are part of Git repositories).
change unless [!] is given.
:Git difftool -y [args] Invoke `git diff [args]`, open each changed file in a
new tab, and invoke `:Gdiffsplit` against the
new tab, and invoke `:Gdiffsplit!` against the
appropriate commit.
*:Git-mergetool*
:Git mergetool [args] Like |:Git-difftool|, but target merge conflicts.
*:Git-push* *:Gpush*
:Git push [args] Invoke git-push, load the results into the |quickfix|
:Gpush [args] list, and invoke |:cwindow| to reveal any errors.
|:Dispatch| is used if available for asynchronous
invocation.
*:Git-fetch* *:Gfetch*
:Git fetch [args] Like |:Gpush|, but for git-fetch.
:Gfetch [args]
*:Git-merge* *:Gmerge*
:Gmerge [args] Deprecated alias for |:Git| merge. Use |:Git-mergetool|
to get the old behavior of loading merge conflicts
into the quickfix list.
*:Git-pull* *:Gpull*
:Gpull [args] Deprecated alias for |:Git| pull.
*:Git-rebase* *:Grebase*
:Grebase [args] Deprecated alias for |:Git| rebase.
*:Git-commit* *:Gcommit*
:Gcommit [args] Deprecated alias for |:Git| commit.
*:Git-revert* *:Grevert*
:Grevert [args] Deprecated alias for |:Git| revert.
*:Gclog* *:Glog*
:Gclog[!] [args] Use git-log [args] to load the commit history into the
:Glog[!] [args] |quickfix| list. Jumps to the first commit unless [!]
@ -208,7 +201,7 @@ that are part of Git repositories).
focus on the current window. During a merge conflict,
this is a three-way diff against the "ours" and
"theirs" ancestors. Additional d2o and d3o maps are
provided to to obtain the hunk from the "ours" or
provided to obtain the hunk from the "ours" or
"theirs" ancestor, respectively.
:Gdiffsplit! {object} Like |:Gdiffsplit|, but retain focus on the current
@ -315,7 +308,7 @@ P under the cursor. On untracked files, this instead
*fugitive_d*
Diff maps ~
*fugitive_dp*
dp Invoke |:Git!| diff on the file under the cursor.
dp Invoke |:Git| diff on the file under the cursor.
Deprecated in favor of inline diffs.
*fugitive_dd*

View File

@ -1,6 +1,6 @@
" fugitive.vim - A Git wrapper so awesome, it should be illegal
" Maintainer: Tim Pope <http://tpo.pe/>
" Version: 3.1
" Version: 3.2
" GetLatestVimScripts: 2975 1 :AutoInstall: fugitive.vim
if exists('g:loaded_fugitive')
@ -66,8 +66,8 @@ function! FugitivePath(...) abort
endfunction
" FugitiveParse() takes a fugitive:// URL and returns a 2 element list
" containing the Git dir and an object name ("commit:file"). It's effectively
" then inverse of FugitiveFind().
" containing an object name ("commit:file") and the Git dir. It's effectively
" the inverse of FugitiveFind().
function! FugitiveParse(...) abort
let path = s:Slash(a:0 ? a:1 : @%)
if path !~# '^fugitive:'
@ -103,6 +103,24 @@ function! FugitiveConfig(...) abort
endif
endfunction
" Retrieve a Git configuration value. An optional second argument provides
" the Git dir as with FugitiveFind(). Pass a blank string to limit to the
" global config.
function! FugitiveConfigGet(name, ...) abort
return call('FugitiveConfig', [a:name] + a:000)
endfunction
" Like FugitiveConfigGet(), but return a list of all values.
function! FugitiveConfigGetAll(name, ...) abort
if a:0 && type(a:1) ==# type({})
let config = a:1
else
let config = fugitive#Config(FugitiveGitDir(a:0 ? a:1 : -1))
endif
let name = substitute(a:name, '^[^.]\+\|[^.]\+$', '\L&', 'g')
return copy(get(config, name, []))
endfunction
function! FugitiveRemoteUrl(...) abort
return fugitive#RemoteUrl(a:0 ? a:1 : '', FugitiveGitDir(a:0 > 1 ? a:2 : -1))
endfunction
@ -261,9 +279,23 @@ function! FugitiveDetect(path) abort
let b:git_dir = dir
endif
endif
if exists('b:git_dir')
return fugitive#Init()
if !exists('b:git_dir') || !exists('#User#Fugitive')
return ''
endif
if v:version >= 704 || (v:version == 703 && has('patch442'))
doautocmd <nomodeline> User Fugitive
elseif &modelines > 0
let modelines = &modelines
try
set modelines=0
doautocmd User Fugitive
finally
let &modelines = modelines
endtry
else
doautocmd User Fugitive
endif
return ''
endfunction
function! FugitiveVimPath(path) abort
@ -339,6 +371,10 @@ augroup fugitive
\ if len(FugitiveGitDir()) |
\ call fugitive#MapCfile('fugitive#MessageCfile()') |
\ endif
autocmd FileType git,gitcommit
\ if len(FugitiveGitDir()) && &foldtext ==# 'foldtext()' |
\ setlocal foldtext=fugitive#Foldtext() |
\ endif
autocmd FileType fugitive
\ if len(FugitiveGitDir()) |
\ call fugitive#MapCfile('fugitive#StatusCfile()') |