fugitive.txt 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  1. *fugitive.txt* A Git wrapper so awesome, it should be illegal
  2. Author: Tim Pope <http://tpo.pe/>
  3. License: Same terms as Vim itself (see |license|)
  4. This plugin is only available if 'compatible' is not set.
  5. INTRODUCTION *fugitive*
  6. Whenever you edit a file from a Git repository, a set of commands is defined
  7. that serve as a gateway to Git.
  8. COMMANDS *fugitive-commands*
  9. These commands are local to the buffers in which they work (generally, buffers
  10. that are part of Git repositories).
  11. *fugitive-:G*
  12. :G [args] Same as :Git, but two characters shorter.
  13. *fugitive-summary*
  14. :Git With no arguments, bring up a summary window vaguely
  15. akin to git-status. If a summary window is already
  16. open for the current repository, it is focused
  17. instead. Press g? or see |fugitive-maps| for usage.
  18. *:Git*
  19. :Git {args} Run an arbitrary git command and display any output.
  20. On UNIX this uses a pty and on other platforms it uses
  21. a pipe, which will cause some behavior differences
  22. such as the absence of progress bars. Any file the
  23. command edits (for example, a commit message) will be
  24. loaded into a split window. Closing that window will
  25. resume running the command. A few Git subcommands
  26. have different behavior; these are documented below.
  27. *:Git!*
  28. :Git! {args} Run an arbitrary git command in the background and
  29. stream the output to the preview window. Requires a
  30. Vim with |setbufline()|. Press CTRL-D during an
  31. interactive :Git invocation to switch to this mode
  32. retroactively.
  33. *:Git_--paginate* *:Git_-p*
  34. :Git --paginate {args} Run an arbitrary git command, capture output to a temp
  35. :Git -p {args} file, and |:split| that temp file. Pass ++curwin as
  36. the first argument to |:edit| the temp file instead.
  37. A temp file is always used for commands like diff and
  38. log that typically uses a pager, and for any command
  39. that has the pager.<cmd> Git configuration option set.
  40. :{range}Git! --paginate {args}
  41. :{range}Git! -p {args} Run an arbitrary git command, and insert the output
  42. after {range} in the current buffer.
  43. *:Git_blame*
  44. :Git blame [flags] Run git-blame [flags] on the current file and open the
  45. results in a scroll-bound vertical split. The
  46. following maps, which work on the cursor line commit
  47. where sensible, are provided:
  48. g? show this help
  49. A resize to end of author column
  50. C resize to end of commit column
  51. D resize to end of date/time column
  52. gq close blame, then |:Gedit| to return to work
  53. tree version
  54. <CR> close blame, and jump to patch that added line
  55. (or directly to blob for boundary commit)
  56. o jump to patch or blob in horizontal split
  57. O jump to patch or blob in new tab
  58. p jump to patch or blob in preview window
  59. - reblame at commit
  60. The maps |fugitive_P| and |fugitive_~| are also
  61. supported to reblame on a parent commit, but this is
  62. inherently fragile, as the line being blamed will no
  63. longer exist. The preferred alternative is to use
  64. <CR> to open up the commit, select the corresponding
  65. `-` line that you care about, and press <CR> twice
  66. more to reblame at that line. Viewing the commit also
  67. gives you additional context as to why the line
  68. changed.
  69. *g:fugitive_dynamic_colors*
  70. In the GUI or a 256 color terminal, commit hashes will
  71. be highlighted in different colors. To disable this:
  72. >
  73. let g:fugitive_dynamic_colors = 0
  74. <
  75. :[range]Git blame [...] If a range is given, just that part of the file will
  76. :Git blame [...] {file} be blamed, and a horizontal split without
  77. scrollbinding is used. You can also give an arbitrary
  78. filename.
  79. *:Git_difftool*
  80. :Git[!] difftool [args] Invoke `git diff [args]` and load the changes into the
  81. quickfix list. Each changed hunk gets a separate
  82. quickfix entry unless you pass an option like
  83. --name-only or --name-status. Jumps to the first
  84. change unless [!] is given.
  85. :Git difftool -y [args] Invoke `git diff [args]`, open each changed file in a
  86. new tab, and invoke |:Gdiffsplit!| against the
  87. appropriate commit.
  88. *:Git_mergetool*
  89. :Git mergetool [args] Like |:Git_difftool|, but target merge conflicts.
  90. Wrappers for Vim built-ins ~
  91. These all directly map onto a built-in Vim command, and generally have names
  92. that prepend "G" to the command they are wrapping. For example, :Ggrep is G
  93. plus |:grep|.
  94. *:Ggrep* *:Git_grep*
  95. :Ggrep[!] [args] An approximation of |:grep|[!] with git-grep as
  96. :Git[!] grep -O [args] 'grepprg'.
  97. :Ggrep[!] --quiet [args]
  98. :Ggrep[!] -q [args] Like |:Ggrep|, but instead of displaying output, open
  99. the quickfix list.
  100. *:Glgrep*
  101. :Glgrep[!] [args] :Ggrep but for |:lgrep|.
  102. :0Git[!] grep -O [args]
  103. *:Gclog*
  104. :Gclog[!] [args] Use git-log [args] to load the commit history into the
  105. |quickfix| list. Jumps to the first commit unless [!]
  106. is given. This command wraps |:cfile|.
  107. The quickfix list can be awkward for many use cases
  108. and exhibits extremely poor performance with larger
  109. data sets. Consider using |:Git| log --oneline
  110. instead.
  111. :{range}Gclog[!] [args] Use git-log -L to load previous revisions of the given
  112. range of the current file into the |quickfix| list.
  113. The cursor is positioned on the first line of the
  114. first diff hunk for each commit. Use :0Gclog to
  115. target the entire file.
  116. *:Gllog*
  117. :Gllog [args] Like |:Gclog|, but use the location list instead of the
  118. |quickfix| list.
  119. *:Gcd*
  120. :Gcd [directory] |:cd| relative to the repository.
  121. *:Glcd*
  122. :Glcd [directory] |:lcd| relative to the repository.
  123. *:Gedit* *fugitive-:Ge*
  124. :Gedit [object] |:edit| a |fugitive-object|.
  125. *:Gsplit*
  126. :Gsplit [object] |:split| a |fugitive-object|.
  127. *:Gvsplit*
  128. :Gvsplit [object] |:vsplit| a |fugitive-object|.
  129. *:Gtabedit*
  130. :Gtabedit [object] |:tabedit| a |fugitive-object|.
  131. *:Gpedit*
  132. :Gpedit [object] |:pedit| a |fugitive-object|.
  133. *:Gdrop*
  134. :Gdrop [object] |:drop| a |fugitive-object|.
  135. *:Gread* *fugitive-:Gr*
  136. :Gread [object] Empty the buffer and |:read| a |fugitive-object|.
  137. When the argument is omitted, this is similar to
  138. git-checkout on a work tree file or git-add on a stage
  139. file, but without writing anything to disk.
  140. :{range}Gread [object] |:read| in a |fugitive-object| after {range}.
  141. *:Gwrite* *fugitive-:Gw*
  142. :Gwrite Write to the current file's path and stage the results.
  143. When run in a work tree file, it is effectively git
  144. add. Elsewhere, it is effectively git-checkout. A
  145. great deal of effort is expended to behave sensibly
  146. when the work tree or index version of the file is
  147. open in another buffer.
  148. :Gwrite {path} You can give |:Gwrite| an explicit path of where in
  149. the work tree to write. You can also give a path like
  150. :0:foo.txt or :0:% to write to just that stage in
  151. the index.
  152. *:Gwq*
  153. :Gwq [path] Like |:Gwrite| followed by |:quit| if the write
  154. succeeded.
  155. :Gwq! [path] Like |:Gwrite|! followed by |:quit|! if the write
  156. succeeded.
  157. *:Gdiffsplit*
  158. :Gdiffsplit [object] Perform a |vimdiff| against the given file, or if a
  159. commit is given, the current file in that commit.
  160. With no argument, the version in the index or work
  161. tree is used, and the work tree version is always
  162. placed to the right or bottom, depending on available
  163. width. Use Vim's |do| and |dp| to stage and unstage
  164. changes.
  165. *:Gdiffsplit!*
  166. :Gdiffsplit! Diff against any and all direct ancestors, retaining
  167. focus on the current window. During a merge conflict,
  168. this is a three-way diff against the "ours" and
  169. "theirs" ancestors. Additional d2o and d3o maps are
  170. provided to obtain the hunk from the "ours" or
  171. "theirs" ancestor, respectively.
  172. :Gdiffsplit! {object} Like |:Gdiffsplit|, but retain focus on the current
  173. window.
  174. *:Gvdiffsplit*
  175. :Gvdiffsplit [object] Like |:Gdiffsplit|, but always split vertically.
  176. *:Ghdiffsplit*
  177. :Gdiffsplit ++novertical [object]
  178. :Ghdiffsplit [object] Like |:Gdiffsplit|, but with "vertical" removed from
  179. 'diffopt'. The split will still be vertical if
  180. combined with |:vertical|.
  181. Other commands ~
  182. These do not directly correspond to any built-in Vim command, and have a
  183. capital letter after the "G" to convey this. For example, the file move
  184. operation has nothing to do with the |:move| built-in, so it is named :GMove,
  185. not :Gmove.
  186. *:GMove*
  187. :GMove {destination} Wrapper around git-mv that renames the buffer
  188. afterward. Add a ! to pass -f.
  189. *:GRename*
  190. :GRename {destination} Like |:GMove| but operates relative to the parent
  191. directory of the current file.
  192. *:GDelete*
  193. :GDelete Wrapper around git-rm that deletes the buffer
  194. afterward. When invoked in an index file, --cached is
  195. passed. Add a ! to pass -f and forcefully discard the
  196. buffer.
  197. *:GRemove* *:GUnlink*
  198. :GRemove Like |:GDelete|, but keep the (now empty) buffer around.
  199. :GUnlink
  200. *:GBrowse*
  201. :GBrowse Open the current file, blob, tree, commit, or tag
  202. in your browser at the upstream hosting provider.
  203. Upstream providers can be added by installing an
  204. appropriate Vim plugin. For example, GitHub can be
  205. supported by installing rhubarb.vim, available at
  206. <https://github.com/tpope/vim-rhubarb>.
  207. :GBrowse {object} Like :GBrowse, but for a given |fugitive-object|.
  208. :{range}GBrowse [args] Appends an anchor to the URL that emphasizes the
  209. selected lines. This also forces the URL to include a
  210. commit rather than a branch name so it remains valid
  211. if the file changes. You can give a range of "0" to
  212. force this behavior without including an anchor.
  213. :GBrowse [...]@{remote} Force using the given remote rather than the remote
  214. for the current branch. The remote is used to
  215. determine which upstream repository to link to.
  216. :GBrowse {url} Open an arbitrary URL in your browser.
  217. :[range]GBrowse! [args] Like :GBrowse, but put the URL on the clipboard rather
  218. than opening it.
  219. MAPS *fugitive-maps*
  220. These maps are available in both the |fugitive-summary| buffer and Fugitive
  221. object buffers, although not all maps make sense in all buffers. Mappings
  222. that operate on the file or hunk under the cursor are generally available in
  223. visual mode to operate on multiple files or partial hunks.
  224. *fugitive-staging-maps*
  225. Staging/unstaging maps ~
  226. *fugitive_s*
  227. s Stage (add) the file or hunk under the cursor.
  228. *fugitive_u*
  229. u Unstage (reset) the file or hunk under the cursor.
  230. *fugitive_-*
  231. - Stage or unstage the file or hunk under the cursor.
  232. *fugitive_U*
  233. U Unstage everything.
  234. *fugitive_X*
  235. X Discard the change under the cursor. This uses
  236. `checkout` or `clean` under the hood. A command is
  237. echoed that shows how to undo the change. Consult
  238. `:messages` to see it again. During a merge conflict,
  239. use 2X to call `checkout --ours` or 3X to call
  240. `checkout --theirs` .
  241. *fugitive_=*
  242. = Toggle an inline diff of the file under the cursor.
  243. *fugitive_>*
  244. > Insert an inline diff of the file under the cursor.
  245. *fugitive_<*
  246. < Remove the inline diff of the file under the cursor.
  247. *fugitive_gI*
  248. gI Open .git/info/exclude in a split and add the file
  249. under the cursor. Use a count to open .gitignore.
  250. *fugitive_I*
  251. I Invoke |:Git| add --patch or reset --patch on the file
  252. P under the cursor. On untracked files, this instead
  253. calls |:Git| add --intent-to-add.
  254. *fugitive_d*
  255. Diff maps ~
  256. *fugitive_dp*
  257. dp Invoke |:Git| diff on the file under the cursor.
  258. Deprecated in favor of inline diffs.
  259. *fugitive_dd*
  260. dd Perform a |:Gdiffsplit| on the file under the cursor.
  261. *fugitive_dv*
  262. dv Perform a |:Gvdiffsplit| on the file under the cursor.
  263. *fugitive_ds* *fugitive_dh*
  264. ds Perform a |:Ghdiffsplit| on the file under the cursor.
  265. dh
  266. *fugitive_dq*
  267. dq Close all but the currently focused diff buffer, and
  268. invoke |:diffoff|!.
  269. *fugitive_d?*
  270. d? Show this help.
  271. *fugitive-navigation-maps*
  272. Navigation maps ~
  273. *fugitive_<CR>*
  274. <CR> Open the file or |fugitive-object| under the cursor.
  275. In a blob, this and similar maps jump to the patch
  276. from the diff where this was added, or where it was
  277. removed if a count was given. If the line is still in
  278. the work tree version, passing a count takes you to
  279. it.
  280. *fugitive_o*
  281. o Open the file or |fugitive-object| under the cursor in
  282. a new split.
  283. *fugitive_gO*
  284. gO Open the file or |fugitive-object| under the cursor in
  285. a new vertical split.
  286. *fugitive_O*
  287. O Open the file or |fugitive-object| under the cursor in
  288. a new tab.
  289. *fugitive_p*
  290. p Open the file or |fugitive-object| under the cursor in
  291. a preview window. In the status buffer, 1p is
  292. required to bypass the legacy usage instructions.
  293. *fugitive_~*
  294. ~ Open the current file in the [count]th first ancestor.
  295. *fugitive_P*
  296. P Open the current file in the [count]th parent.
  297. Experimental: In the "Unpushed" section of the status
  298. buffer, this will populate the command line with a
  299. ":Git push" command for the commit under the cursor.
  300. *fugitive_C*
  301. C Open the commit containing the current file.
  302. *fugitive_CTRL-P* *fugitive_(*
  303. ( Jump to the previous file, hunk, or revision.
  304. *fugitive_CTRL-N* *fugitive_)*
  305. ) Jump to the next file, hunk, or revision.
  306. *fugitive_[c*
  307. [c Jump to previous hunk, expanding inline diffs
  308. automatically. (This shadows the Vim built-in |[c|
  309. that provides a similar operation in |diff| mode.)
  310. *fugitive_]c*
  311. ]c Jump to next hunk, expanding inline diffs
  312. automatically. (This shadows the Vim built-in |]c|
  313. that provides a similar operation in |diff| mode.)
  314. *fugitive_[/* *fugitive_[m*
  315. [/ Jump to previous file, collapsing inline diffs
  316. [m automatically. (Mnemonic: "/" appears in filenames,
  317. "m" appears in "filenames".)
  318. *fugitive_]/* *fugitive_]m*
  319. ]/ Jump to next file, collapsing inline diffs
  320. ]m automatically. (Mnemonic: "/" appears in filenames,
  321. "m" appears in "filenames".)
  322. *fugitive_i*
  323. i Jump to the next file or hunk, expanding inline diffs
  324. automatically.
  325. *fugitive_[[*
  326. [[ Jump [count] sections backward.
  327. *fugitive_]]*
  328. ]] Jump [count] sections forward.
  329. *fugitive_[]*
  330. [] Jump [count] section ends backward.
  331. *fugitive_][*
  332. ][ Jump [count] section ends forward.
  333. *fugitive_star*
  334. * On the first column of a + or - diff line, search for
  335. the corresponding - or + line. Otherwise, defer to
  336. built-in |star|.
  337. *fugitive_#*
  338. # Same as "*", but search backward.
  339. *fugitive_gu*
  340. gu Jump to file [count] in the "Untracked" or "Unstaged"
  341. section.
  342. *fugitive_gU*
  343. gU Jump to file [count] in the "Unstaged" section.
  344. *fugitive_gs*
  345. gs Jump to file [count] in the "Staged" section.
  346. *fugitive_gp*
  347. gp Jump to file [count] in the "Unpushed" section.
  348. *fugitive_gP*
  349. gP Jump to file [count] in the "Unpulled" section.
  350. *fugitive_gr*
  351. gr Jump to file [count] in the "Rebasing" section.
  352. *fugitive_gi*
  353. gi Open .git/info/exclude in a split. Use a count to
  354. open .gitignore.
  355. *fugitive_c*
  356. Commit maps ~
  357. cc Create a commit.
  358. ca Amend the last commit and edit the message.
  359. ce Amend the last commit without editing the message.
  360. cw Reword the last commit.
  361. cvc Create a commit with -v.
  362. cva Amend the last commit with -v
  363. cf Create a `fixup!` commit for the commit under the
  364. cursor.
  365. cF Create a `fixup!` commit for the commit under the
  366. cursor and immediately rebase it.
  367. cs Create a `squash!` commit for the commit under the
  368. cursor.
  369. cS Create a `squash!` commit for the commit under the
  370. cursor and immediately rebase it.
  371. cA Create a `squash!` commit for the commit under the
  372. cursor and edit the message.
  373. c<Space> Populate command line with ":Git commit ".
  374. *fugitive_cr*
  375. crc Revert the commit under the cursor.
  376. crn Revert the commit under the cursor in the index and
  377. work tree, but do not actually commit the changes.
  378. cr<Space> Populate command line with ":Git revert ".
  379. *fugitive_cm*
  380. cm<Space> Populate command line with ":Git merge ".
  381. c? Show this help.
  382. *fugitive_cb*
  383. *fugitive_co*
  384. Checkout/branch maps ~
  385. coo Check out the commit under the cursor.
  386. cb<Space> Populate command line with ":Git branch ".
  387. co<Space> Populate command line with ":Git checkout ".
  388. cb? Show this help.
  389. co?
  390. *fugitive_cz*
  391. Stash maps ~
  392. czz Push stash. Pass a [count] of 1 to add
  393. `--include-untracked` or 2 to add `--all`.
  394. czw Push stash of the work-tree. Like `czz` with
  395. `--keep-index`.
  396. czs Push stash of the stage. Does not accept a count.
  397. czA Apply topmost stash, or stash@{count}.
  398. cza Apply topmost stash, or stash@{count}, preserving the
  399. index.
  400. czP Pop topmost stash, or stash@{count}.
  401. czp Pop topmost stash, or stash@{count}, preserving the
  402. index.
  403. cz<Space> Populate command line with ":Git stash ".
  404. cz? Show this help.
  405. *fugitive_r*
  406. Rebase maps ~
  407. ri Perform an interactive rebase. Uses ancestor of
  408. u commit under cursor as upstream if available.
  409. rf Perform an autosquash rebase without editing the todo
  410. list. Uses ancestor of commit under cursor as
  411. upstream if available.
  412. ru Perform an interactive rebase against @{upstream}.
  413. rp Perform an interactive rebase against @{push}.
  414. rr Continue the current rebase.
  415. rs Skip the current commit and continue the current
  416. rebase.
  417. ra Abort the current rebase.
  418. re Edit the current rebase todo list.
  419. rw Perform an interactive rebase with the commit under
  420. the cursor set to `reword`.
  421. rm Perform an interactive rebase with the commit under
  422. the cursor set to `edit`.
  423. rd Perform an interactive rebase with the commit under
  424. the cursor set to `drop`.
  425. r<Space> Populate command line with ":Git rebase ".
  426. r? Show this help.
  427. *fugitive-misc-maps*
  428. Miscellaneous maps ~
  429. *fugitive_gq* *fugitive_q*
  430. gq Close the status buffer.
  431. *fugitive_.*
  432. . Start a |:| command line with the file under the
  433. cursor prepopulated.
  434. *fugitive_g?*
  435. g? Show help for |fugitive-maps|.
  436. *fugitive-global-maps*
  437. Global maps ~
  438. *fugitive_c_CTRL-R_CTRL-G*
  439. <C-R><C-G> On the command line, recall the path to the current
  440. |fugitive-object| (that is, a representation of the
  441. object recognized by |:Gedit|).
  442. *fugitive_y_CTRL-G*
  443. ["x]y<C-G> Yank the path to the current |fugitive-object|.
  444. *g:fugitive_no_maps*
  445. Global maps can be disabled with the g:fugitive_no_maps option.
  446. >
  447. let g:fugitive_no_maps = 1
  448. <
  449. SPECIFYING OBJECTS *fugitive-object* *fugitive-revision*
  450. Fugitive objects are either work tree files or Git revisions as defined in the
  451. "SPECIFYING REVISIONS" section in the git-rev-parse man page, with expansions
  452. inspired by |cmdline-special| layered on top. For commands that accept an
  453. optional object, the default is the file in the index for work tree files and
  454. the work tree file for everything else. Example objects follow.
  455. Object Meaning ~
  456. @ The commit referenced by @ aka HEAD
  457. master The commit referenced by master
  458. master^ The parent of the commit referenced by master
  459. master...other The merge base of master and other
  460. master: The tree referenced by master
  461. ./master The file named master in the working directory
  462. :(top)master The file named master in the work tree
  463. Makefile The file named Makefile in the work tree
  464. @^:Makefile The file named Makefile in the parent of HEAD
  465. :Makefile The file named Makefile in the index (writable)
  466. @~2:% The current file in the grandparent of HEAD
  467. :% The current file in the index
  468. :1:% The current file's common ancestor during a conflict
  469. :2:# The alternate file in the target branch during a conflict
  470. :3:#5 The file from buffer #5 in the merged branch during a conflict
  471. ! The commit owning the current file
  472. !:Makefile The file named Makefile in the commit owning the current file
  473. !3^2 The second parent of the commit owning buffer #3
  474. .git/config The repo config file
  475. : The |fugitive-summary| buffer
  476. - A temp file containing the last |:Git| invocation's output
  477. <cfile> The file or commit under the cursor
  478. STATUSLINE *fugitive-statusline*
  479. *FugitiveStatusline()* *fugitive#statusline()*
  480. Add %{FugitiveStatusline()} to your statusline to get an indicator including
  481. the current branch and the currently edited file's commit. If you don't have
  482. a statusline, this one matches the default when 'ruler' is set:
  483. >
  484. set statusline=%<%f\ %h%m%r%{FugitiveStatusline()}%=%-14.(%l,%c%V%)\ %P
  485. <
  486. AUTOCOMMANDS *fugitive-autocommands*
  487. A handful of |User| |autocommands| are provided to allow extending and
  488. overriding Fugitive behaviors. Example usage:
  489. >
  490. autocmd User FugitiveBlob,FugitiveStageBlob call s:BlobOverrides()
  491. <
  492. *User_FugitiveTag*
  493. FugitiveTag After loading a tag object.
  494. *User_FugitiveCommit*
  495. FugitiveCommit After loading a commit object.
  496. *User_FugitiveTree*
  497. FugitiveTree After loading a tree (directory) object.
  498. *User_FugitiveBlob*
  499. FugitiveBlob After loading a committed blob (file) object.
  500. *User_FugitiveObject*
  501. FugitiveObject After loading any of the 4 above buffer types.
  502. *User_FugitiveStageBlob*
  503. FugitiveStageBlob After loading a staged blob (file) object. These
  504. buffers are 'modifiable' and oftentimes don't want the
  505. same behavior as the other buffer types.
  506. *User_FugitiveIndex*
  507. FugitiveIndex After loading the |fugitive-summary| buffer.
  508. *User_FugitivePager*
  509. FugitivePager After loading a temp file created by a command like
  510. :Git --paginate or :Git blame.
  511. *User_FugitiveEditor*
  512. FugitiveEditor After a :Git command (e.g., :Git commit) edits a file
  513. (e.g., the commit message).
  514. *User_FugitiveChanged*
  515. FugitiveChanged After any event which can potentially change the
  516. repository, for example, any invocation of |:Git|.
  517. Originally intended for expiring caches, but can have
  518. other uses.
  519. API *fugitive-api*
  520. Officially supported functions are documented inline in plugin/fugitive.vim.
  521. DEPRECATIONS *fugitive-deprecated*
  522. The following commands are deprecated in favor of replacements that adhere to
  523. a new naming scheme. Remember that |:Git| can be shortened to |:G|, so
  524. replacements using it are just one space character longer than the legacy
  525. version.
  526. *:Gremove* Superseded by |:GRemove|.
  527. *:Gdelete* Superseded by |:GDelete|.
  528. *:Gmove* Superseded by |:GMove|.
  529. *:Grename* Superseded by |:GRename|.
  530. *:Gbrowse* Superseded by |:GBrowse|.
  531. *:Gdiff* Superseded by |:Gdiffsplit|
  532. *:Gsdiff* Superseded by |:Ghdiffsplit|
  533. *:Gvdiff* Superseded by |:Gvdiffsplit| or |:vert| |:Gdiffsplit|.
  534. *:Gblame* Superseded by |:Git_blame|.
  535. *:Gcommit* Superseded by |:Git| commit.
  536. *:Gmerge* Superseded by |:Git| merge and |:Git_mergetool|.
  537. *:Gpull* Superseded by |:Git| pull.
  538. *:Grebase* Superseded by |:Git| rebase.
  539. *:Grevert* Superseded by |:Git| revert.
  540. *:Gpush* Superseded by |:Git| push.
  541. *:Gfetch* Superseded by |:Git| fetch.
  542. *:Glog* Superseded by |:Gclog|.
  543. *:Gstatus* Superseded by |:Git| (with no arguments).
  544. *:Gsplit!* Superseded by |:Git_--paginate|.
  545. *:Gvsplit!* Superseded by :vert Git --paginate.
  546. *:Gtabsplit!* Superseded by :tab Git --paginate.
  547. *:Gpedit!* Superseded by :Git! --paginate.
  548. *User_Fugitive*
  549. Fugitive used to support `:autocmd User Fugitive` to run an autocommand after
  550. loading any buffer belonging to a Git repository, but this has been phased
  551. out. Instead, one can leverage regular autocommand events like |BufNewFile|
  552. and |BufReadPost|, and check !empty(FugitiveGitDir()) to confirm Fugitive has
  553. found a repository. See also |fugitive-autocommands| for other, more
  554. selective events.
  555. ABOUT *fugitive-about*
  556. Grab the latest version or report a bug on GitHub:
  557. https://github.com/tpope/vim-fugitive
  558. vim:tw=78:et:ft=help:norl: