Skip to content
rbong edited this page Jan 25, 2022 · 12 revisions

This guide describes how to switch from Flog v1 to v2.

For some changes, but not all, you will receive deprecation warnings when using v1-only interfaces.

Warning: Flog v2 is currently in alpha.

Major New Features

  • Flog now draws the graph branches itself
  • Flog is now faster
  • Branch and commit highlighting is now more accurate

Prerequisites

  • Vim 8 is required for the alpha
    • Neovim will be supported in the full release
  • LuaJIT 2.1 must be installed on your system
    • Flog will check for the luajit executable
    • You can specify the path to the executable yourself with g:flog_lua_bin

Installation

  • Switch to the v2 branch, ex: Plug 'rbong/vim-flog', { 'branch': 'v2' }

Updated Mappings

  • )/( are now separate bindings from <C-N>/<C-P>. They jump to commits without opening them
  • ]r/[r no longer open the commit by default
  • cot now defaults to col, to avoid confusion with git checkout -t

Updated Commands

  • Flogjump is no longer present for optimization reasons
    • For commits in the current window, use //?
    • For commits not in the current window, use Flogsetargs -rev=...

Updated Settings

  • g:flog_default_arguments/g:flog_permanent_default_arguments are now g:flog_default_opts/g:flog_permanent_default_opts
    • Options no longer have the no_ prefix, ex: { 'no_merges': v:true } is now { 'merges': v:false }
  • g:flog_build_log_command_fn is no longer supported since Flog builds the log graph itself
  • g:flog_use_ansi_esc is no longer supported since branch highlighting is more accurate

Updated Functions

  • flog#run_command() is now flog#exec()
  • flog#run_tmp_command() is now flog#exec_tmp()
  • flog#run_raw_command() is now flog#exec_raw()
  • The internal Flog API has been restructured
    • Most functions will not give deprecation warnings since v2 is a complete refactor
    • Please see ftplugin/floggraph.vim for updated examples

Updated User Autocommands

  • FlogCmdBufferSetup is now FlogSideWinSetup
  • FlogTmpCmdBufferSetup is now FlogTmpSideWinSetup
  • FlogNonTmpCmdBufferSetup is now FlogNonTmpSideWinSetup

New Features/Fixes

Flog v2 has many new features and fixes. A full list of new features and fixes will be included when v2 is released. See :help flog for all current features.

Clone this wiki locally