*flog.txt* A branch viewer for fugitive Author: Roger Bongers License: Same terms as Vim itself (see |license|) INTRODUCTION *flog* Flog is a lightweight branch viewer for vim. Flog provides a wrapper to "git log --graph" that can be run from any git repository. It provides several helpful commands and bindings to interact with the graph. Flog integrates with |fugitive|. See "git log --help" and |fugitive| for more details. COMMANDS *flog-commands* *flog-:Flog* :Flog Open the log graph in a new tab. This command can be run from any file in a git repository. Any |fugitive-commands| can be run from the buffer. When opened in visual mode, the currently selected range and filename is passed to "-limit=". The following options are supported: -all Enable the "--all" argument by default. -bisect Enable the "--bisect" argument by default. -no-merges Enable the "--no-merges" argument by default. -reflog Enable the "--reflog" argument by default. -skip= Passed to "--skip", skipping that number of commits by default. -max-count= Passed to "--max-count", limiting to that number of commits by default. -open-cmd= The command to use to open the window containing the graph. Must give initial focus to the window. Defaults to |tabedit|. -format= A format specifier to pass to "--pretty=format:". Multiline formats are supported. -date= The date format to pass to "--date=". Currently, "short" and "iso8601" are supported. -search= A regex pattern to pass to "--grep=". -patch-search= A regex pattern to pass to "-G". -limit= A limit to pass to "-L". This will restrict commit history to the specified limit. This will limit the log to a single target, disabling some options. -rev= The git revision to pass to the log command. Can be specified more than once. When "-limit=" is specified, only the first revision is used. -path= A path to pass to the log command. This option can be specified multiple times for multiple paths. -raw-args= Additional args to pass to "git log --graph". No args passed in using this option are guaranteed to work. Can be specified multiple times, which will be combined together. -- Parse the rest of the arguments as if they were passed to -raw-args. Does not require escaping spaces. :Flogsplit *flog-:Flogsplit* Open the log graph in a split. Supports ||. Behaves the same as |:Flog| otherwise. :Flogsplitcommit *flog-:Flogsplitcommit* Open a commit under the cursor using |:Gsplit| in a |flog-preview-window|. Can only be run in the |:Flog| window. :Floggit *flog-:Floggit* Open a git command via |:Git|. File completion is available from this command, as well as completion for the commits and refs under the cursor. Completion applies to the first and last lines of the currently or previously selected range if the cursor is on the first or last line of the range. Completion is also available for the commit range using the visual selection range, ex. "COMMIT1..COMMIT2". This command can only be run in the |:Flog| window. :Floggit! *flog-:Floggit!* Same as |:Floggit|, but uses |:Git!|. :Flogupdate *flog-:Flogupdate* Update the arguments passed to |:Flog| or |:Flogsplit|. Can only be run in a |:Flog| window. Merges new arguments with the current arguments. :Flogupdate! *flog-:Flogupdate!* Same as |:Flogupdate|, but overwrite all of the current arguments instead of updating them. :Flogjump *flog-:Flogjump* Jump to the ref name given by the arguments. Must be a ref name currently in the graph. Can only be run in a |:Flog| window. Supports completion. MAPPINGS *flog-mappings* All mappings are available only from the |:Flog| window. a *flog-a* Toggle the "--all" argument. gb *flog-gb* Toggle the "--bisect" argument. gm *flog-gm* Toggle the "--no-merges" argument. gr *flog-gr* Toggle the "--reflog" argument. u *flog-u* Update the graph window. *flog-* Open the commit under the cursor in a preview window. *flog-CTRL-N* Jump to the next commit and open it in a preview window. Accepts a count. *flog-CTRL-P* Jump to the previous commit and open it in a preview window. Accepts a count. ]r *flog-]r* Jump to the next commit with a ref name and open it in a preview window. Accepts a count. [r *flog-[r* Jump to the previous commit with a ref name and open it in a preview window. Accepts a count. g/ *flog-g/* Open the command line with ":Flogupdate -search=". g\ *flog-g\* Open the command line with ":Flogupdate -patch-search=". [[ *flog-[[* Go back in the commit history by "--max-count" commits, if that argument is set. Accepts a count. ]] *flog-]]* Go forward in the commit history by "--max-count" commits, if that argument is set. Accepts a count. git *flog-git* Enter in the characters ":Floggit" from normal or visual mode in order to quickly begin a |:Floggit| command. y *flog-y* Copy the short commit hash under the current line to a register. Accepts a count. go *flog-go* Skip to the commit given by the count, or 0 if no count is given. gq *flog-gq* ZZ *flog-ZZ* Quit Flog. g? *flog-g?* Jump to this list of mappings in help. OPTIONS *flog-options* g:flog_default_arguments *flog-g:flog_default_arguments* A |dict| containing the default values for arguments to |:Flog|. Keys in the dictionary are in underscore format. g:flog_permanent_default_arguments *flog-g:flog_permanent_default_arguments* Like |g:flog_default_arguments|, only the arguments are treated as the plugin defaults and can't be cleared using |:Flog|, |:Flogupdate|, or |:Flogupdate!|. Has lower presidence than |g:flog_default_arguments|. g:flog_use_ansi_esc *flog-g:flog_use_ansi_esc* By default, Flog uses limited regex syntax highlighting. This option enables terminal coloring using the AnsiEsc script. For more details, help and installation, see AnsiEsc: PREVIEW WINDOWS *flog-preview-window* To view more information from the graph, you can open "Flog preview windows". Opening a command in Flog preview windows closes any previously opened preview windows. Flog preview windows will be closed when quitting Flog. ADVANCED USAGE *flog-advanced-usage* Flog keeps an open API in order to allow you to customize it to suit your git workflow. The best way to discover how to use the API is by reading it: https://github.com/rbong/vim-flog/blob/master/autoload/flog.vim vim:tw=78:ts=8:ft=help