From e4e9727819ec72173dc7fb75c741c40c734a0052 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 21 Jun 2024 02:35:00 +0100 Subject: [PATCH] Add `vim-autoread` > Automatically causes vim to reload files which have been written on disk but not modified in the buffer since the last write from vim. This enables a file open in vim to be edited using another application and saved. Upon returning to vim, as long as you haven't modified the file since the last change, the file will be automatically updated to reflect the changes made on disk, as though you had pressed :e manually. https://github.com/djoshea/vim-autoread --- lib/default.nix | 1 + overlays/vim-plugins.nix | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/lib/default.nix b/lib/default.nix index 2524eb2..371b859 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -72,6 +72,7 @@ rec { vimPlugins.vim-nix vimPlugins.vim-projectionist vimPlugins.nvim-spectre + vimPlugins.vim-autoread vimPlugins.vim-obsession vimPlugins.vim-pasta vimPlugins.vim-repeat diff --git a/overlays/vim-plugins.nix b/overlays/vim-plugins.nix index 3da3f96..ff9c6f7 100644 --- a/overlays/vim-plugins.nix +++ b/overlays/vim-plugins.nix @@ -10,6 +10,16 @@ final: prev: { }; }; + vim-autoread = final.vimUtils.buildVimPlugin { + name = "vim-autoread"; + src = final.fetchFromGitHub { + owner = "djoshea"; + repo = "vim-autoread"; + rev = "24061f84652d768bfb85d222c88580b3af138dab"; + sha256 = "fSADjNt1V9jgAPjxggbh7Nogcxyisi18KaVve8j+c3w="; + }; + }; + vim-textobj-xmlattr = final.vimUtils.buildVimPlugin { name = "vim-textobj-xmlattr"; src = final.fetchFromGitHub {