/fleeting.nvim

Primary LanguageLuaMIT LicenseMIT

Fleeting.nvim

Time is fleeting, and what better way to spend it than configuring using Neovim!

This plugin simply keeps track of the amount of time you have spent in neovim (since installing the plugin, it's not magic).


Notification using nvim-notify:

Notification showcase with vim notify

Without a fancy notification plugin:

Notification showcase with default vim

This is a dastardly simple plugin, and by dastardly simple, I mean I wrote it today. Today is obviously not today for you, but it is for me. Anyway...

Installation

Requires neovim, and a plugin manager of your choice.

Using lazy:

{ 'sammce/fleeting.nvim' },

packer:

use { 'sammce/fleeting.nvim' }

vim-plug:

Plug 'sammce/fleeting.nvim'

Usage

Refer to the table of commands below:

Command Effect
:Fleeting Display a notification showing how long you've spent in neovim
:FleetingReset Reset the timer and log file to 0. Doesn't get your time back
:FleetingDelete Delete the log file, effectively resetting the timer

How it works

No, again, this plugin is not magic (unfortunately). The plugin simply marks the time when you enter and leave neovim, calculates the difference, and stores it in a file at vim.fn.stdpath("cache") .. "/fleeting.log", usually equivalent to ~/.cache/nvim/fleeting.log. This allows the plugin to persist the timer over multiple neovim sessions.

Care is taken to prevent 'double tracking' when using multiple instances of neovim, so worry not! The timer will reflect the true amount of time neovim has been open.

License

See LICENSE

Contributing

If you would like to contribute, please open a pull request! I'd be more than happy to expand this plugin.