Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
neovim: true
version: stable
- uses: charmbracelet/vhs-action@v2
- uses: charmbracelet/vhs-action@v3
with:
path: demo/demo.tape
- uses: actions/upload-artifact@v4
Expand Down
Binary file added demo/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions demo/demo.tape
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ Sleep 4s
Type "q"
Sleep 300ms

# 6. Reopen the file: the statusline count and the boxes come back.
Type ":w | bd | e pkg/controller/reconcile.go"
Sleep 500ms
Enter
Sleep 2.5s

# Clean up.
Hide
Type ":qa!"
Expand Down
10 changes: 10 additions & 0 deletions demo/init.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
-- Minimal config for the VHS demo: `vhs demo/demo.tape` from the repo root.
-- Older Neovims draw Vim's legacy 16-color scheme: fail instead of recording it.
if vim.fn.has("nvim-0.10") == 0 then
io.stderr:write("demo needs Neovim 0.10+, got " .. table.concat({ vim.version().major, vim.version().minor, vim.version().patch }, ".") .. "\n")
vim.cmd("cquit")
end

local repo = vim.fs.dirname(vim.fs.dirname(debug.getinfo(1, "S").source:sub(2)))
vim.opt.runtimepath:prepend(repo)

Expand All @@ -7,8 +13,12 @@ vim.opt.number = true
vim.opt.signcolumn = "yes"
vim.opt.termguicolors = true
vim.opt.swapfile = false
vim.opt.hlsearch = false -- keep search matches from lingering in the recording
vim.opt.shortmess:append("I")
vim.opt.showcmd = false -- no pending "]" of "]a" in the corner
vim.opt.laststatus = 3
-- File on the left, the buffer's annotation count ("NOTE 2") on the right.
vim.opt.statusline = " %f %m%=%#DiagnosticInfo#%{v:lua.require'annotate'.statusline()}%* %l:%c "

require("annotate").setup({
-- Throwaway store, so the demo never touches real annotations.
Expand Down
Loading