-
Notifications
You must be signed in to change notification settings - Fork 23
v2 Migration Guide
rbong edited this page Jun 18, 2023
·
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.
- Flog now draws the graph branches itself
- Flog is now faster
- Branch and commit highlighting is now more accurate
- Vim 8/9/Neovim is required
-
LuaJIT 2.1 must be installed on your system if you are using Vim 8/9
- Flog will check for the
luajit
executable - You can specify the path to the executable yourself with
g:flog_lua_bin
- If you have compiled Vim with LuaJIT 2.1, you can use
let g:flog_use_internal_lua = 1
- Flog will check for the
- Install Flog normally, ex:
Plug 'rbong/vim-flog'
- The preferred arg for
-sort=
is now-order=
. Everywhere that refers to "sort" now uses "order" instead.
-
)
/(
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 tocol
, to avoid confusion withgit checkout -t
-
gss
now defaults togoo
. Similarly,gsd
/gsa
/gst
now default togod
/goa
/got
-
go
now defaults togcg
-
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=...
- For commits in the current window, use
-
Floggit
now supports flags-
--focus
/-f
: keep focus -
--static
/-s
: prevent updating graph buffer -
--tmp
/-t
: use temporary side window
-
-
Floggit
now uses!
to meanGit!
(run commands in background) instead of opening in a temporary window- Use
t
/--tmp
to run in a temporary window
- Use
-
g:flog_default_arguments
/g:flog_permanent_default_arguments
are nowg: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 }
- Options no longer have the
-
g:flog_enable_status
is now required to setb:flog_status_summary
for statuslines -
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
-
flog#run_command()
,flog#run_tmp_command()
, andflog#run_raw_command()
are deprecated- Use
flog#Exec()
to run commands- The third argument is now inverted (don't update the graph buffer instead of update it)
- The other arguments are the same as
flog#run_command()
- Does not format commands
- Use
flog#ExecTmp()
to run commands in side windows- The third argument is now inverted
- The other arguments are the same as
flog#run_tmp_command()
- Does not format commands
- Use
flog#Format()
to format commands -
:Floggit
now has many capabilities offlog#Exec()
through flags (see Updated Commands)
- Use
- 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
-
FlogCmdBufferSetup
is nowFlogSideWinSetup
-
FlogTmpCmdBufferSetup
is nowFlogTmpSideWinSetup
-
FlogNonTmpCmdBufferSetup
is nowFlogNonTmpSideWinSetup
- AnsiEsc is not currently supported in v2.
- Syntax highlighting is now better looking and faster
- There is now a public and private API. For the full public API, see
:help flog-functions
- Flog will now automatically run
git commit-graph write
the first time it is opened in a repo. See also:help g:flog_write_commit_graph
- Added the
:Flog -no-graph
option to not draw any graph - Added the binding
^
(<Plug>(FlogJumpToCommitCol)
) to jump between the visual column containing the branch of the highlighted commit and the commit details - Added syntax highlighting and completion for more date formats
See :help flog
for all current features.