Introduction
Command line tools are very powerful, but nobody likes typing the same commands over and over again (source):
I used to search git
syntax and flags on stackoverflow. Now I just open lazygit
and press ?
for a context-based help menu:
My ~/.config/lazygit/config.yml
:
git:
paging:
colorArg: always
pager: delta --dark --paging=never
os:
editCommand: "nvim" # see 'Configuring File Editing' section
Integration Tips
1. Neovim
I use the plugin lazygit.nvim and have the following line in legendary.nvim:
{ "<C-g>", "<cmd>LazyGit<CR>", description = "Lazygit" }
So that I can spawn lazygit
inside Neovim with a simple <C-g>
keybinding.
2. zsh
I have the following in ~/.zshrc
:
lazygit_func () {
eval 'lazygit'
}
zle -N lazygit_func
bindkey '^g' lazygit_func
So that I can open lazygit
with the same <C-g>
keybinding in terminal.
3. ranger
I have the following in ~/.config/ranger/rc.conf
:
unmap <C-g>
map <C-g> shell lazygit
That’s right. I can also spawn lazygit
in ranger
.
Honorable Mentions
gitui: similar to lazygit
but written in Rust.
tig text-mode interface in terminal.
Conclusion
With all the integration (neovim, terminal, ranger), there’s no more excuses NOT to commit early and often.