-
Couldn't load subscription status.
- Fork 28
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
luajitexecutable - 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/[rno longer open the commit by default -
cotnow defaults tocol, to avoid confusion withgit checkout -t -
gssnow defaults togoo. Similarly,gsd/gsa/gstnow default togod/goa/got -
gonow defaults togcg
-
Flogjumpis 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
-
Floggitnow supports flags-
--focus/-f: keep focus -
--static/-s: prevent updating graph buffer -
--tmp/-t: use temporary side window
-
-
Floggitnow uses!to meanGit!(run commands in background) instead of opening in a temporary window- Use
t/--tmpto run in a temporary window
- Use
-
g:flog_default_arguments/g:flog_permanent_default_argumentsare 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_statusis now required to setb:flog_status_summaryfor statuslines -
g:flog_build_log_command_fnis no longer supported since Flog builds the log graph itself -
g:flog_use_ansi_escis 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 -
:Floggitnow 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
-
FlogCmdBufferSetupis nowFlogSideWinSetup -
FlogTmpCmdBufferSetupis nowFlogTmpSideWinSetup -
FlogNonTmpCmdBufferSetupis 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 writethe first time it is opened in a repo. See also:help g:flog_write_commit_graph - Added the
:Flog -no-graphoption 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.