Skip to content

Don't forget to commit and push your changes anymore! NeoVim plugin.

Notifications You must be signed in to change notification settings

Amzd/dontforgit.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

dontforgit.nvim

Don't forget to commit and push your changes anymore!

If you are like me and often quit NeoVim without committing or pushing, this plugin will remind you to do so.

dontforgit_demo.mp4

Installation

{
  "amzd/dontforgit.nvim",
  config = function()
    require("dontforgit").setup()
  end
}

Options

require("dontforgit").setup {
    -- If you often work in projects without git then turn this off to stop this plugin pestering you
    notify_git_failed = true,
    -- If you want to use a different git command (eg for dotfiles when in home directory) you can do so here
    git_command = "!git",
    -- If you always do `:!git <something>` then you can set this to "!git " to save typing
    -- or if you want to use fugitive you might want to set this to "Git " or ""
    prompt_prefix = "!",
    -- Wether to add `-s -b` to `git status` command
    compact = false,
    -- Disable the hint
    disable_hint = false
}

Usage

Quit NeoVim without committing or pushing and you will be prompted to do so.

When you have committed and pushed everything it automatically quits.

You can force close using <Esc>, <C-c>, or :q without committing everything.

To run git status again you can just <Enter> without any input (either empty string or same as config.prompt_prefix).

How it works

This plugin hooks the VimLeavePre event and blocks nvim shutting down by using vim.ui.input in a loop.

About

Don't forget to commit and push your changes anymore! NeoVim plugin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages