Skip to content

wsdjeg/record-screen.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

record-screen.nvim

record-screen.nvim is a Neovim screen recording plugin that uses ffmpeg command for screen recording.

Installation

using nvim-plug

require('plug').add({
    {
        'wsdjeg/record-screen.nvim',
        depends = {
            { 'wsdjeg/job.nvim' },
            { 'wsdjeg/notify.nvim' },
        },
        config = function()
            vim.keymap.set(
                'n',
                '<F8>',
                '<cmd>lua require("record-screen").start()<cr>',
                { silent = true }
            )
            vim.keymap.set(
                'n',
                '<F9>',
                '<cmd>lua require("record-screen").stop()<cr>',
                { silent = true }
            )
        end,
    },
})

Setup

require('record-screen').setup({
    cmd = 'ffmpeg',
    argvs = { '-f', 'gdigrab', '-i', 'desktop', '-f', 'mp4' },
    target_dir = 'D:/outputs',
})

Recording Example

2025-4-8-1-41-3.mp4

Debug

You can enable logger and install logger.nvim to debug this plugin:

require('plug').add({
    {
        'wsdjeg/record-screen.nvim',
        depends = {
            { 'wsdjeg/job.nvim' },
            { 'wsdjeg/notify.nvim' },
            {
                'wsdjeg/logger.nvim',
                config = function()
                    vim.keymap.set(
                        'n',
                        '<leader>hL',
                        '<cmd>lua require("logger").viewRuntimeLog()<cr>',
                        { silent = true }
                    )
                end,
            },
        },
        config = function()
            vim.keymap.set(
                'n',
                '<F8>',
                '<cmd>lua require("record-screen").start()<cr>',
                { silent = true }
            )
            vim.keymap.set(
                'n',
                '<F9>',
                '<cmd>lua require("record-screen").stop()<cr>',
                { silent = true }
            )
        end,
    },
})

and the runtime log is:

[ record-screen.nvim ] [01:15:45:587] [ Info  ] cmd is: { "ffmpeg", "-f", "gdigrab", "-i", "desktop", "-f", "mp4", "C:/Users/wsdjeg/Desktop/2025-4-8-1-15-45.mp4" }
[ record-screen.nvim ] [01:15:47:794] [ Info  ] job exit with: code 0 single 0

Self-Promotion

Like this plugin? Star the repository on GitHub.

Love this plugin? Follow me on GitHub and Twitter.

About

Neovim screen recording plugin

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages