Skip to content

0x15BA88FF/tnew.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ tnew.nvim

A simple Neovim plugin for managing temporary scratch files.

✨ Features

  • Create a new scratch file
  • Delete or move temp files to trash

⚑️ Requirements

  • Neovim
  • Trash utility (optional): trash-cli or gio

πŸ“¦ Installation

Install the plugin using your preferred package manager:

-- lazy.nvim
{
  "0x15ba88ff/tnew.nvim",
  config = function()
    require("tnew").setup()
  end,
  cmd = { "Tnew", "TnewClean" }
}

-- packer.nvim
use({
  "0x15ba88ff/tnew.nvim",
  config = function()
    require("tnew").setup()
  end,
  cmd = { "Tnew", "TnewClean" },
})

βš™οΈ Configuration

tnew.nvim comes with the following defaults:

{
  dir = vim.fn.stdpath("cache") .. "/tnew", -- Where to store temp files
  filename = "%Y-%m-%d_%H-%M-%S",           -- Format for filenames
  default_ext = "md",                       -- Default file extension
  delete_to_trash = false                    -- Move files to trash instead of deleting permanently
}

Configuration is optional β€” it works out of the box.

πŸš€ Commands

Command Description
:Tnew Open a new temp file with the default extension
:Tnew md Open a new temp file with the .md extension
:TnewClean Delete or move all temp files to trash

πŸ“„ License

Licensed under the Apache License 2.0. See the LICENSE file for details.

About

A dead simple plugin for persistent temporary notes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages