Giter Site home page Giter Site logo

nvim-fundo's Introduction

nvim-fundo

The goal of nvim-fundo is to make Neovim's undo file become stable and useful.

fundo-demo.mp4

WIP. If you like this plugin, star it to let me speed up to end WIP state.

Features

  • Restore undo history even if the file's content has been changed outside Neovim
  • Limit size for archives

TODO Features

  • Restore undo history even if the file has been moved
  • Support useful use cases for undo file

Quickstart

Requirements

Installation

Install with Packer.nvim:

use {
    'kevinhwang91/nvim-fundo', requires = 'kevinhwang91/promise-async',
     run = function() require('fundo').install() end
}

Minimal configuration

use {
    'kevinhwang91/nvim-fundo', requires = 'kevinhwang91/promise-async',
     run = function() require('fundo').install() end
}

vim.o.undofile = true
require('fundo').setup()

Usage

Use undo file as usual.

Documentation

How does nvim-undo keep the undo history?

Fundo will keep the latest files as archives, in other words, it takes additional space in your disk. If the BufReadPost event is fired, it will validate the undo file and restore it if necessary.

Setup and description

{
    archives_dir = {
        description = [[The directory to store the archives]],
        default = vim.fn.stdpath('cache') .. path.separator .. 'fundo'
    },
    limit_archives_size = {
        description = [[Limit the archives directory size, unit is MB(megabyte), elder files will be
        removed based on their modified time]],
        default = 512
    }
}

:h fundo may help you to get the all default configuration.

API

fundo.lua

Run tests

make test

Feedback

  • If you get an issue or come up with an awesome idea, don't hesitate to open an issue in github.
  • If you think this plugin is useful or cool, consider rewarding it a star.

License

The project is licensed under a BSD-3-clause license. See LICENSE file for details.

nvim-fundo's People

Contributors

kevinhwang91 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.